You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #pragma once
  2. #include <stdbool.h>
  3. typedef enum
  4. {
  5. ShutDown = 1, //关机
  6. StartingUp, //开机
  7. } power_state_t;
  8. typedef enum
  9. {
  10. NoHeat = 1, //没加热
  11. Heating, //加热中
  12. HeatComplete, //加热完成
  13. } heating_plate_state_t;
  14. typedef enum
  15. {
  16. NoReaction = 1, //没反应
  17. Reacting, //反应中
  18. ReactionComplete, //反应完成
  19. } reaction_state_t;
  20. typedef enum
  21. {
  22. NotConnected = 1, //未连接
  23. Connecting, //连接中
  24. ConnectionComplete, //连接完成
  25. } wifi_state_t;
  26. typedef struct
  27. {
  28. power_state_t state;
  29. bool change_flag;
  30. } power_state_light_structer_t;
  31. typedef struct
  32. {
  33. heating_plate_state_t state;
  34. bool change_flag;
  35. } heating_plate_state_light_structer_t;
  36. typedef struct
  37. {
  38. reaction_state_t state;
  39. bool change_flag;
  40. } reaction_state_light_structer_t;
  41. typedef struct
  42. {
  43. wifi_state_t state;
  44. bool change_flag;
  45. } wifi_state_light_structer_t;
  46. // Debug light
  47. void T_debug_light_init(void);
  48. void T_debug_light_toggle_level(void);
  49. // Power light
  50. void T_power_light_init(power_state_light_structer_t *power_state_light_structer);
  51. // Heating state light
  52. void T_heating_plate_state_light_init(heating_plate_state_light_structer_t *heating_plate_state_light_structer);
  53. // Reaction state light
  54. void T_reaction_state_light_init(reaction_state_light_structer_t *reaction_state_light_structer);
  55. // WIFI state light
  56. void T_wifi_state_light_init(wifi_state_light_structer_t *wifi_state_light_structer);
  57. // Schedule
  58. void T_debug_light_schedule(void);