progress on GPIO example

pull/4/head
Kevin Hester 2020-12-07 10:17:24 +08:00
rodzic 6e8d220ad0
commit f38b8e3040
2 zmienionych plików z 9 dodań i 8 usunięć

Wyświetl plik

@ -33,7 +33,7 @@
- [remote_hardware.proto](#remote_hardware.proto) - [remote_hardware.proto](#remote_hardware.proto)
- [HardwareMessage](#.HardwareMessage) - [HardwareMessage](#.HardwareMessage)
- [HardwareMessage.MessageType](#.HardwareMessage.MessageType) - [HardwareMessage.Type](#.HardwareMessage.Type)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -616,13 +616,14 @@ Also provides easy remote access to any GPIO.
In the future other remote hardware operations can be added based on user interest In the future other remote hardware operations can be added based on user interest
(i.e. serial output, spi/i2c input/output). (i.e. serial output, spi/i2c input/output).
FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the channel FIXME - currently this feature is turned on by default which is dangerous because no security yet (beyond the
channel mechanism). It should be off by default and then protected based on some TBD mechanism (a special channel?) channel mechanism). It should be off by default and then protected based on some TBD mechanism (a special channel
once multichannel support is included?)
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| typ | [HardwareMessage.MessageType](#HardwareMessage.MessageType) | | What type of HardwareMessage is this? | | typ | [HardwareMessage.Type](#HardwareMessage.Type) | | What type of HardwareMessage is this? |
| gpio_mask | [uint64](#uint64) | | What gpios are we changing. Not used for all MessageTypes, see MessageType for details | | gpio_mask | [uint64](#uint64) | | What gpios are we changing. Not used for all MessageTypes, see MessageType for details |
| gpio_value | [uint64](#uint64) | | For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios. Not used for all MessageTypes, see MessageType for details | | gpio_value | [uint64](#uint64) | | For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios. Not used for all MessageTypes, see MessageType for details |
@ -633,9 +634,9 @@ channel mechanism). It should be off by default and then protected based on som
<a name=".HardwareMessage.MessageType"></a> <a name=".HardwareMessage.Type"></a>
### HardwareMessage.MessageType ### HardwareMessage.Type
| Name | Number | Description | | Name | Number | Description |

Wyświetl plik

@ -12,7 +12,7 @@ channel mechanism). It should be off by default and then protected based on som
once multichannel support is included?) once multichannel support is included?)
*/ */
message HardwareMessage { message HardwareMessage {
enum MessageType { enum Type {
/** Unset/unused */ /** Unset/unused */
UNSET = 0; UNSET = 0;
@ -37,7 +37,7 @@ message HardwareMessage {
} }
/** What type of HardwareMessage is this? */ /** What type of HardwareMessage is this? */
MessageType typ = 1; Type typ = 1;
/** What gpios are we changing. Not used for all MessageTypes, see MessageType for details */ /** What gpios are we changing. Not used for all MessageTypes, see MessageType for details */
uint64 gpio_mask = 2; uint64 gpio_mask = 2;