input.pb.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Automatically generated nanopb header */
  2. /* Generated by nanopb-0.4.5 */
  3. #ifndef PB_PB_INPUT_INPUT_PB_H_INCLUDED
  4. #define PB_PB_INPUT_INPUT_PB_H_INCLUDED
  5. #include <pb.h>
  6. #if PB_PROTO_HEADER_VERSION != 40
  7. #error Regenerate this file with the current version of nanopb generator.
  8. #endif
  9. /* Enum definitions */
  10. typedef enum _PB_Input_Key {
  11. PB_Input_Key_UP = 0,
  12. PB_Input_Key_DOWN = 1,
  13. PB_Input_Key_RIGHT = 2,
  14. PB_Input_Key_LEFT = 3,
  15. PB_Input_Key_OK = 4,
  16. PB_Input_Key_BACK = 5
  17. } PB_Input_Key;
  18. typedef enum _PB_Input_Type {
  19. PB_Input_Type_PRESS = 0, /* *< Press event, emitted after debounce */
  20. PB_Input_Type_RELEASE = 1, /* *< Release event, emitted after debounce */
  21. PB_Input_Type_SHORT = 2, /* *< Short event, emitted after InputTypeRelease done withing INPUT_LONG_PRESS interval */
  22. PB_Input_Type_LONG = 3, /* *< Long event, emmited after INPUT_LONG_PRESS interval, asynchronouse to InputTypeRelease */
  23. PB_Input_Type_REPEAT = 4 /* *< Repeat event, emmited with INPUT_REPEATE_PRESS period after InputTypeLong event */
  24. } PB_Input_Type;
  25. /* Struct definitions */
  26. typedef struct _PB_Input_SendEventRequest {
  27. PB_Input_Key key;
  28. PB_Input_Type type;
  29. } PB_Input_SendEventRequest;
  30. /* Helper constants for enums */
  31. #define _PB_Input_Key_MIN PB_Input_Key_UP
  32. #define _PB_Input_Key_MAX PB_Input_Key_BACK
  33. #define _PB_Input_Key_ARRAYSIZE ((PB_Input_Key)(PB_Input_Key_BACK+1))
  34. #define _PB_Input_Type_MIN PB_Input_Type_PRESS
  35. #define _PB_Input_Type_MAX PB_Input_Type_REPEAT
  36. #define _PB_Input_Type_ARRAYSIZE ((PB_Input_Type)(PB_Input_Type_REPEAT+1))
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. /* Initializer values for message structs */
  41. #define PB_Input_SendEventRequest_init_default {_PB_Input_Key_MIN, _PB_Input_Type_MIN}
  42. #define PB_Input_SendEventRequest_init_zero {_PB_Input_Key_MIN, _PB_Input_Type_MIN}
  43. /* Field tags (for use in manual encoding/decoding) */
  44. #define PB_Input_SendEventRequest_key_tag 1
  45. #define PB_Input_SendEventRequest_type_tag 2
  46. /* Struct field encoding specification for nanopb */
  47. #define PB_Input_SendEventRequest_FIELDLIST(X, a) \
  48. X(a, STATIC, SINGULAR, UENUM, key, 1) \
  49. X(a, STATIC, SINGULAR, UENUM, type, 2)
  50. #define PB_Input_SendEventRequest_CALLBACK NULL
  51. #define PB_Input_SendEventRequest_DEFAULT NULL
  52. extern const pb_msgdesc_t PB_Input_SendEventRequest_msg;
  53. /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
  54. #define PB_Input_SendEventRequest_fields &PB_Input_SendEventRequest_msg
  55. /* Maximum encoded size of messages (where known) */
  56. #define PB_Input_SendEventRequest_size 4
  57. #ifdef __cplusplus
  58. } /* extern "C" */
  59. #endif
  60. #endif