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.

42 lines
757 B

3 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. typedef enum {
  4. klevel1 = 0,
  5. klevel2,
  6. } level_t;
  7. typedef enum {
  8. knormal,
  9. ktimingMode,
  10. kintermittentMode,
  11. } mode_t;
  12. typedef enum {
  13. knone_active,
  14. kchange_level_input,
  15. kchange_countdonw_time_input,
  16. kchange_intermittentmode_time_input,
  17. } active_input_t;
  18. typedef struct {
  19. bool poweron;
  20. mode_t mode;
  21. level_t level;
  22. //
  23. active_input_t active_input;
  24. uint32_t active_start_ticket;
  25. int countdonwnum;
  26. int countdonwnum_s;
  27. int countdonw_s_setting_num;
  28. uint32_t countdonw_start_ticket;
  29. bool intermittentMode_idle;
  30. } device_state_t;
  31. #define kconst_flash_auto_close_time (3000)
  32. // #define kconst_countdown_step_s (15 * 60)
  33. #define kconst_countdown_step_s (10)
  34. extern device_state_t thisDevice;