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.

45 lines
833 B

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