Added remote hardware pins plumbing

pull/346/head
Ben Meadors 2023-05-15 08:03:42 -05:00
rodzic 345b3bf103
commit 05139e0db1
6 zmienionych plików z 75 dodań i 0 usunięć

Wyświetl plik

@ -12,3 +12,5 @@
*OEMStore.oem_text max_size:40
*OEMStore.oem_icon_bits max_size:2048
*OEMStore.oem_aes_key max_size:32
*NodeRemoteHardwarePins.node_remote_hardware_pins max_count:12

Wyświetl plik

@ -72,6 +72,11 @@ message DeviceState {
* Might be null
*/
MeshPacket rx_waypoint = 12;
/*
* The mesh's nodes with their available gpio pins for RemoteHardware module
*/
repeated NodeRemoteHardwarePins node_remote_hardware_pins = 13;
}
/*
@ -158,4 +163,20 @@ message OEMStore {
* A Preset LocalModuleConfig to apply during factory reset
*/
LocalModuleConfig oem_local_module_config = 8;
}
/*
* RemoteHardwarePins associated with a node
*/
message NodeRemoteHardwarePin {
/*
* The node_num exposing the available gpio pin
*/
uint32 node_num = 1;
/*
* The the available gpio pin for usage with RemoteHardware module
*/
RemoteHardwarePin pin = 2;
}

Wyświetl plik

@ -54,3 +54,5 @@
*NeighborInfo.neighbors max_count:10
*DeviceMetadata.firmware_version max_size:18
*RemoteHardwarePin.name max_size:15

Wyświetl plik

@ -1469,3 +1469,41 @@ message Neighbor {
*/
HardwareModel hw_model = 9;
}
/*
* A GPIO pin definition for remote hardware module
*/
message RemoteHardwarePin {
/*
* GPIO Pin number (must match Arduino)
*/
uint32 gpio_pin = 1;
/*
* Name for the GPIO pin (i.e. Front gate, mailbox, etc)
*/
string name = 2;
/*
* Type of GPIO access available to consumers on the mesh
*/
RemoteHardwarePinType type = 3;
}
enum RemoteHardwarePinType {
/*
* Unset/unused (should never occur)
*/
UNSET = 0;
/*
* GPIO pin can be read (if it is high / low)
*/
ANALOG_READ = 1;
/*
* GPIO pin can be written to (high / low)
*/
ANALOG_WRITE = 2;
}

Wyświetl plik

@ -14,3 +14,5 @@
*ExternalNotificationConfig.output_vibra int_size:8
*ExternalNotificationConfig.output_buzzer int_size:8
*ExternalNotificationConfig.nag_timeout int_size:16
*RemoteHardwareConfig:available_pins max_count:4

Wyświetl plik

@ -78,6 +78,16 @@ message ModuleConfig {
* Whether the Module is enabled
*/
bool enabled = 1;
/*
* Whether the Module allows consumers to read / write to pins not defined in available_pins
*/
bool allow_undefined_pin_access = 2;
/*
* Exposes the available pins to the mesh for reading and writing
*/
repeated RemoteHardwarePin available_pins = 3:
}
/*