mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
re-add namespacing in protobufs. Let's see what i missed. Portduino likely ...
Checking in generated on purpose.
This commit is contained in:
@@ -11,22 +11,22 @@
|
||||
|
||||
/* Enum definitions */
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _HardwareMessage_Type {
|
||||
typedef enum _meshtastic_HardwareMessage_Type {
|
||||
/* Unset/unused */
|
||||
HardwareMessage_Type_UNSET = 0,
|
||||
meshtastic_HardwareMessage_Type_UNSET = 0,
|
||||
/* Set gpio gpios based on gpio_mask/gpio_value */
|
||||
HardwareMessage_Type_WRITE_GPIOS = 1,
|
||||
meshtastic_HardwareMessage_Type_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. */
|
||||
HardwareMessage_Type_WATCH_GPIOS = 2,
|
||||
meshtastic_HardwareMessage_Type_WATCH_GPIOS = 2,
|
||||
/* The gpios listed in gpio_mask have changed, the new values are listed in gpio_value */
|
||||
HardwareMessage_Type_GPIOS_CHANGED = 3,
|
||||
meshtastic_HardwareMessage_Type_GPIOS_CHANGED = 3,
|
||||
/* Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated */
|
||||
HardwareMessage_Type_READ_GPIOS = 4,
|
||||
meshtastic_HardwareMessage_Type_READ_GPIOS = 4,
|
||||
/* A reply to READ_GPIOS. gpio_mask and gpio_value will be populated */
|
||||
HardwareMessage_Type_READ_GPIOS_REPLY = 5
|
||||
} HardwareMessage_Type;
|
||||
meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY = 5
|
||||
} meshtastic_HardwareMessage_Type;
|
||||
|
||||
/* Struct definitions */
|
||||
/* An example app to show off the module system. This message is used for
|
||||
@@ -38,15 +38,15 @@ typedef enum _HardwareMessage_Type {
|
||||
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?) */
|
||||
typedef struct _HardwareMessage {
|
||||
typedef struct _meshtastic_HardwareMessage {
|
||||
/* What type of HardwareMessage is this? */
|
||||
HardwareMessage_Type type;
|
||||
meshtastic_HardwareMessage_Type type;
|
||||
/* What gpios are we changing. Not used for all MessageTypes, see MessageType for details */
|
||||
uint64_t gpio_mask;
|
||||
/* 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_t gpio_value;
|
||||
} HardwareMessage;
|
||||
} meshtastic_HardwareMessage;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -54,37 +54,37 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _HardwareMessage_Type_MIN HardwareMessage_Type_UNSET
|
||||
#define _HardwareMessage_Type_MAX HardwareMessage_Type_READ_GPIOS_REPLY
|
||||
#define _HardwareMessage_Type_ARRAYSIZE ((HardwareMessage_Type)(HardwareMessage_Type_READ_GPIOS_REPLY+1))
|
||||
#define _meshtastic_HardwareMessage_Type_MIN meshtastic_HardwareMessage_Type_UNSET
|
||||
#define _meshtastic_HardwareMessage_Type_MAX meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY
|
||||
#define _meshtastic_HardwareMessage_Type_ARRAYSIZE ((meshtastic_HardwareMessage_Type)(meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY+1))
|
||||
|
||||
#define HardwareMessage_type_ENUMTYPE HardwareMessage_Type
|
||||
#define meshtastic_HardwareMessage_type_ENUMTYPE meshtastic_HardwareMessage_Type
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define HardwareMessage_init_default {_HardwareMessage_Type_MIN, 0, 0}
|
||||
#define HardwareMessage_init_zero {_HardwareMessage_Type_MIN, 0, 0}
|
||||
#define meshtastic_HardwareMessage_init_default {_meshtastic_HardwareMessage_Type_MIN, 0, 0}
|
||||
#define meshtastic_HardwareMessage_init_zero {_meshtastic_HardwareMessage_Type_MIN, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define HardwareMessage_type_tag 1
|
||||
#define HardwareMessage_gpio_mask_tag 2
|
||||
#define HardwareMessage_gpio_value_tag 3
|
||||
#define meshtastic_HardwareMessage_type_tag 1
|
||||
#define meshtastic_HardwareMessage_gpio_mask_tag 2
|
||||
#define meshtastic_HardwareMessage_gpio_value_tag 3
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define HardwareMessage_FIELDLIST(X, a) \
|
||||
#define meshtastic_HardwareMessage_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, type, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT64, gpio_mask, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT64, gpio_value, 3)
|
||||
#define HardwareMessage_CALLBACK NULL
|
||||
#define HardwareMessage_DEFAULT NULL
|
||||
#define meshtastic_HardwareMessage_CALLBACK NULL
|
||||
#define meshtastic_HardwareMessage_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t HardwareMessage_msg;
|
||||
extern const pb_msgdesc_t meshtastic_HardwareMessage_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define HardwareMessage_fields &HardwareMessage_msg
|
||||
#define meshtastic_HardwareMessage_fields &meshtastic_HardwareMessage_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define HardwareMessage_size 24
|
||||
#define meshtastic_HardwareMessage_size 24
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
Reference in New Issue
Block a user