forked from meshtastic/protobufs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote_hardware.proto
52 lines (38 loc) · 1.86 KB
/
remote_hardware.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
syntax = "proto3";
option java_package = "com.geeksville.mesh";
option java_outer_classname = "RemoteHardware";
option optimize_for = LITE_RUNTIME;
/** A example app to show off the plugin system. This message is used for REMOTE_HARDWARE_APP PortNums.
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 mechanism). It should be off by default and then protected based on some TBD mechanism (a special channel
once multichannel support is included?)
*/
message HardwareMessage {
enum Type {
/** Unset/unused */
UNSET = 0;
/** Set gpio gpios based on gpio_mask/gpio_value */
WRITE_GPIOS = 1;
/** We are now interested in watching the gpio_mask gpios. If the selected gpios change, please broadcast
GPIOS_CHANGED.
Will implicitly change the gpios requested to be INPUT gpios.
*/
WATCH_GPIOS = 2;
/** The gpios listed in gpio_mask have changed, the new values are listed in gpio_value */
GPIOS_CHANGED = 3;
/** Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated */
READ_GPIOS = 4;
/** A reply to READ_GPIOS. gpio_mask and gpio_value will be populated */
READ_GPIOS_REPLY = 5;
}
/** What type of HardwareMessage is this? */
Type typ = 1;
/** What gpios are we changing. Not used for all MessageTypes, see MessageType for details */
uint64 gpio_mask = 2;
/** 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 */
uint64 gpio_value = 3;
}