ideasX_interface.h 840 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. typedef struct {
  2. uint8_t topic = "hw_ver";
  3. uint8_t minor;
  4. uint8_t major;
  5. } hw_ver_t;
  6. typedef struct {
  7. uint8_t topic = "fw_ver";
  8. uint8_t minor;
  9. uint8_t major;
  10. } fw_ver_t;
  11. typedef struct {
  12. uint8_t topic = "alive";
  13. bool flag;
  14. } alive_t;
  15. typedef struct {
  16. uint8_t topic = "vcell";
  17. uint32_t vcell;
  18. } vcell_t;
  19. typedef struct {
  20. uint8_t topic = "rom";
  21. uint8_t rom;
  22. } rom_t;
  23. typedef struct {
  24. uint8_t topic = "ota";
  25. bool ota;
  26. } ota_t;
  27. typedef struct{
  28. hw_ver_t hw_ver;
  29. fw_ver_t fw_ver;
  30. alive_t alive;
  31. vcell_t vcell;
  32. soc_t soc;
  33. rom_t rom;
  34. ota_t ota;
  35. ssid_t ssid;
  36. bssid_t bssid;
  37. rssi_t rssi;
  38. } ideasX_topics_t;
  39. typedef struct {
  40. uint8_t topic = "ota";
  41. uint32_t* function;
  42. } ideasX_command_ota_t;
  43. typedef struct {
  44. uint8_t topic = "shutdown";
  45. uint32_t* function;
  46. } ideasX_command_shutdown_t;