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.

38 lines
1.2 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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #ifndef _LIGHT_H_
  2. #define _LIGHT_H_
  3. #include "lib_config.h"
  4. #include "port.h"
  5. #include "system_ES8P5066.h"
  6. #include "systick.h"
  7. #include "board.h"
  8. typedef enum {
  9. RGB_CLOSE = 0, /*关闭灯*/
  10. RGB_COLOR_GERRN = 1, /*打开绿灯*/
  11. RGB_COLOR_BLUE = 2, /*打开蓝灯*/
  12. RGB_COLOR_RED = 3, /*打开红灯*/
  13. } rgb_light_mode_t;
  14. typedef enum {
  15. CLOSE_ALL_LED = 0, /*关闭定时指示灯LED0 LED1 LED2 LED3*/
  16. OPEN_ONE_LED = 1, /*打开LED0*/
  17. OPEN_TWO_LED = 2, /*打开LED0 打开LED1*/
  18. OPEN_THREE_LED = 3, /*打开LED0 打开LED1 打开LED2*/
  19. OPEN_FOUR_LED = 4, /*打开LED0 打开LED1 打开LED2 打开LED3*/
  20. } timing_light_mode_t;
  21. void light_module_set_rgb_mode(rgb_light_mode_t mode);
  22. void light_module_set_error_light_mode(bool open, uint8_t error_mode);
  23. void light_module_set_autoshutdown_indicator_light(bool light);
  24. void light_module_set_rgb_flicker_mode(bool state);
  25. void light_module_close_all_light(void);
  26. static timing_light_mode_t get_timing_light_mode_by_lightnum(int number) { return (timing_light_mode_t)number; }
  27. void light_module_schedule(void);
  28. //外部实现
  29. int hook_get_autoshutdown_timecount();
  30. #endif