 793501d62d
			
		
	
	
		793501d62d
		
			
		
	
	
	
	
		
			
			* Add GPIO control through RPC * Assets: sync protobuf to 0.10 * Assets: update protobuf to fixed v10 Co-authored-by: あく <alleteam@gmail.com>
		
			
				
	
	
		
			184 lines
		
	
	
		
			6.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			184 lines
		
	
	
		
			6.8 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /* Automatically generated nanopb header */
 | |
| /* Generated by nanopb-0.4.5 */
 | |
| 
 | |
| #ifndef PB_PB_GPIO_GPIO_PB_H_INCLUDED
 | |
| #define PB_PB_GPIO_GPIO_PB_H_INCLUDED
 | |
| #include <pb.h>
 | |
| 
 | |
| #if PB_PROTO_HEADER_VERSION != 40
 | |
| #error Regenerate this file with the current version of nanopb generator.
 | |
| #endif
 | |
| 
 | |
| /* Enum definitions */
 | |
| typedef enum _PB_Gpio_GpioPin { 
 | |
|     PB_Gpio_GpioPin_PC0 = 0, 
 | |
|     PB_Gpio_GpioPin_PC1 = 1, 
 | |
|     PB_Gpio_GpioPin_PC3 = 2, 
 | |
|     PB_Gpio_GpioPin_PB2 = 3, 
 | |
|     PB_Gpio_GpioPin_PB3 = 4, 
 | |
|     PB_Gpio_GpioPin_PA4 = 5, 
 | |
|     PB_Gpio_GpioPin_PA6 = 6, 
 | |
|     PB_Gpio_GpioPin_PA7 = 7 
 | |
| } PB_Gpio_GpioPin;
 | |
| 
 | |
| typedef enum _PB_Gpio_GpioPinMode { 
 | |
|     PB_Gpio_GpioPinMode_OUTPUT = 0, 
 | |
|     PB_Gpio_GpioPinMode_INPUT = 1 
 | |
| } PB_Gpio_GpioPinMode;
 | |
| 
 | |
| typedef enum _PB_Gpio_GpioInputPull { 
 | |
|     PB_Gpio_GpioInputPull_NO = 0, 
 | |
|     PB_Gpio_GpioInputPull_UP = 1, 
 | |
|     PB_Gpio_GpioInputPull_DOWN = 2
 | |
| } PB_Gpio_GpioInputPull;
 | |
| 
 | |
| /* Struct definitions */
 | |
| typedef struct _PB_Gpio_GetPinMode { 
 | |
|     PB_Gpio_GpioPin pin; 
 | |
| } PB_Gpio_GetPinMode;
 | |
| 
 | |
| typedef struct _PB_Gpio_GetPinModeResponse { 
 | |
|     PB_Gpio_GpioPinMode mode; 
 | |
| } PB_Gpio_GetPinModeResponse;
 | |
| 
 | |
| typedef struct _PB_Gpio_ReadPin { 
 | |
|     PB_Gpio_GpioPin pin; 
 | |
| } PB_Gpio_ReadPin;
 | |
| 
 | |
| typedef struct _PB_Gpio_ReadPinResponse { 
 | |
|     uint32_t value; 
 | |
| } PB_Gpio_ReadPinResponse;
 | |
| 
 | |
| typedef struct _PB_Gpio_SetInputPull { 
 | |
|     PB_Gpio_GpioPin pin; 
 | |
|     PB_Gpio_GpioInputPull pull_mode; 
 | |
| } PB_Gpio_SetInputPull;
 | |
| 
 | |
| typedef struct _PB_Gpio_SetPinMode { 
 | |
|     PB_Gpio_GpioPin pin; 
 | |
|     PB_Gpio_GpioPinMode mode; 
 | |
| } PB_Gpio_SetPinMode;
 | |
| 
 | |
| typedef struct _PB_Gpio_WritePin { 
 | |
|     PB_Gpio_GpioPin pin; 
 | |
|     uint32_t value; 
 | |
| } PB_Gpio_WritePin;
 | |
| 
 | |
| 
 | |
| /* Helper constants for enums */
 | |
| #define _PB_Gpio_GpioPin_MIN PB_Gpio_GpioPin_PC0
 | |
| #define _PB_Gpio_GpioPin_MAX PB_Gpio_GpioPin_PA7
 | |
| #define _PB_Gpio_GpioPin_ARRAYSIZE ((PB_Gpio_GpioPin)(PB_Gpio_GpioPin_PA7+1))
 | |
| 
 | |
| #define _PB_Gpio_GpioPinMode_MIN PB_Gpio_GpioPinMode_OUTPUT
 | |
| #define _PB_Gpio_GpioPinMode_MAX PB_Gpio_GpioPinMode_INPUT
 | |
| #define _PB_Gpio_GpioPinMode_ARRAYSIZE ((PB_Gpio_GpioPinMode)(PB_Gpio_GpioPinMode_INPUT+1))
 | |
| 
 | |
| #define _PB_Gpio_GpioInputPull_MIN PB_Gpio_GpioInputPull_NO
 | |
| #define _PB_Gpio_GpioInputPull_MAX PB_Gpio_GpioInputPull_DOWN
 | |
| #define _PB_Gpio_GpioInputPull_ARRAYSIZE ((PB_Gpio_GpioInputPull)(PB_Gpio_GpioInputPull_DOWN+1))
 | |
| 
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| /* Initializer values for message structs */
 | |
| #define PB_Gpio_SetPinMode_init_default          {_PB_Gpio_GpioPin_MIN, _PB_Gpio_GpioPinMode_MIN}
 | |
| #define PB_Gpio_SetInputPull_init_default        {_PB_Gpio_GpioPin_MIN, _PB_Gpio_GpioInputPull_MIN}
 | |
| #define PB_Gpio_GetPinMode_init_default          {_PB_Gpio_GpioPin_MIN}
 | |
| #define PB_Gpio_GetPinModeResponse_init_default  {_PB_Gpio_GpioPinMode_MIN}
 | |
| #define PB_Gpio_ReadPin_init_default             {_PB_Gpio_GpioPin_MIN}
 | |
| #define PB_Gpio_ReadPinResponse_init_default     {0}
 | |
| #define PB_Gpio_WritePin_init_default            {_PB_Gpio_GpioPin_MIN, 0}
 | |
| #define PB_Gpio_SetPinMode_init_zero             {_PB_Gpio_GpioPin_MIN, _PB_Gpio_GpioPinMode_MIN}
 | |
| #define PB_Gpio_SetInputPull_init_zero           {_PB_Gpio_GpioPin_MIN, _PB_Gpio_GpioInputPull_MIN}
 | |
| #define PB_Gpio_GetPinMode_init_zero             {_PB_Gpio_GpioPin_MIN}
 | |
| #define PB_Gpio_GetPinModeResponse_init_zero     {_PB_Gpio_GpioPinMode_MIN}
 | |
| #define PB_Gpio_ReadPin_init_zero                {_PB_Gpio_GpioPin_MIN}
 | |
| #define PB_Gpio_ReadPinResponse_init_zero        {0}
 | |
| #define PB_Gpio_WritePin_init_zero               {_PB_Gpio_GpioPin_MIN, 0}
 | |
| 
 | |
| /* Field tags (for use in manual encoding/decoding) */
 | |
| #define PB_Gpio_GetPinMode_pin_tag               1
 | |
| #define PB_Gpio_GetPinModeResponse_mode_tag      1
 | |
| #define PB_Gpio_ReadPin_pin_tag                  1
 | |
| #define PB_Gpio_ReadPinResponse_value_tag        2
 | |
| #define PB_Gpio_SetInputPull_pin_tag             1
 | |
| #define PB_Gpio_SetInputPull_pull_mode_tag       2
 | |
| #define PB_Gpio_SetPinMode_pin_tag               1
 | |
| #define PB_Gpio_SetPinMode_mode_tag              2
 | |
| #define PB_Gpio_WritePin_pin_tag                 1
 | |
| #define PB_Gpio_WritePin_value_tag               2
 | |
| 
 | |
| /* Struct field encoding specification for nanopb */
 | |
| #define PB_Gpio_SetPinMode_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pin,               1) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    mode,              2)
 | |
| #define PB_Gpio_SetPinMode_CALLBACK NULL
 | |
| #define PB_Gpio_SetPinMode_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_SetInputPull_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pin,               1) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pull_mode,         2)
 | |
| #define PB_Gpio_SetInputPull_CALLBACK NULL
 | |
| #define PB_Gpio_SetInputPull_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_GetPinMode_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pin,               1)
 | |
| #define PB_Gpio_GetPinMode_CALLBACK NULL
 | |
| #define PB_Gpio_GetPinMode_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_GetPinModeResponse_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    mode,              1)
 | |
| #define PB_Gpio_GetPinModeResponse_CALLBACK NULL
 | |
| #define PB_Gpio_GetPinModeResponse_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_ReadPin_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pin,               1)
 | |
| #define PB_Gpio_ReadPin_CALLBACK NULL
 | |
| #define PB_Gpio_ReadPin_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_ReadPinResponse_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UINT32,   value,             2)
 | |
| #define PB_Gpio_ReadPinResponse_CALLBACK NULL
 | |
| #define PB_Gpio_ReadPinResponse_DEFAULT NULL
 | |
| 
 | |
| #define PB_Gpio_WritePin_FIELDLIST(X, a) \
 | |
| X(a, STATIC,   SINGULAR, UENUM,    pin,               1) \
 | |
| X(a, STATIC,   SINGULAR, UINT32,   value,             2)
 | |
| #define PB_Gpio_WritePin_CALLBACK NULL
 | |
| #define PB_Gpio_WritePin_DEFAULT NULL
 | |
| 
 | |
| extern const pb_msgdesc_t PB_Gpio_SetPinMode_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_SetInputPull_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_GetPinMode_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_GetPinModeResponse_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_ReadPin_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_ReadPinResponse_msg;
 | |
| extern const pb_msgdesc_t PB_Gpio_WritePin_msg;
 | |
| 
 | |
| /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
 | |
| #define PB_Gpio_SetPinMode_fields &PB_Gpio_SetPinMode_msg
 | |
| #define PB_Gpio_SetInputPull_fields &PB_Gpio_SetInputPull_msg
 | |
| #define PB_Gpio_GetPinMode_fields &PB_Gpio_GetPinMode_msg
 | |
| #define PB_Gpio_GetPinModeResponse_fields &PB_Gpio_GetPinModeResponse_msg
 | |
| #define PB_Gpio_ReadPin_fields &PB_Gpio_ReadPin_msg
 | |
| #define PB_Gpio_ReadPinResponse_fields &PB_Gpio_ReadPinResponse_msg
 | |
| #define PB_Gpio_WritePin_fields &PB_Gpio_WritePin_msg
 | |
| 
 | |
| /* Maximum encoded size of messages (where known) */
 | |
| #define PB_Gpio_GetPinModeResponse_size          2
 | |
| #define PB_Gpio_GetPinMode_size                  2
 | |
| #define PB_Gpio_ReadPinResponse_size             6
 | |
| #define PB_Gpio_ReadPin_size                     2
 | |
| #define PB_Gpio_SetInputPull_size                4
 | |
| #define PB_Gpio_SetPinMode_size                  4
 | |
| #define PB_Gpio_WritePin_size                    8
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| } /* extern "C" */
 | |
| #endif
 | |
| 
 | |
| #endif
 |