From f38b8e3040528aaf1f1b4b9024ff8df2e14ba961 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 7 Dec 2020 10:17:24 +0800 Subject: [PATCH] progress on GPIO example --- docs/docs.md | 13 +++++++------ remote_hardware.proto | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index 1950843..ee69a21 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -33,7 +33,7 @@ - [remote_hardware.proto](#remote_hardware.proto) - [HardwareMessage](#.HardwareMessage) - - [HardwareMessage.MessageType](#.HardwareMessage.MessageType) + - [HardwareMessage.Type](#.HardwareMessage.Type) - [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 (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 -channel mechanism). It should be off by default and then protected based on some TBD mechanism (a special 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 +once multichannel support is included?) | 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_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 - + -### HardwareMessage.MessageType +### HardwareMessage.Type | Name | Number | Description | diff --git a/remote_hardware.proto b/remote_hardware.proto index 4b6249d..badc365 100644 --- a/remote_hardware.proto +++ b/remote_hardware.proto @@ -12,7 +12,7 @@ channel mechanism). It should be off by default and then protected based on som once multichannel support is included?) */ message HardwareMessage { - enum MessageType { + enum Type { /** Unset/unused */ UNSET = 0; @@ -37,7 +37,7 @@ message HardwareMessage { } /** 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 */ uint64 gpio_mask = 2;