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.
40 lines
1.2 KiB
40 lines
1.2 KiB
#ifndef _LIGHT_H_
|
|
#define _LIGHT_H_
|
|
|
|
#include "board.h"
|
|
#include "lib_config.h"
|
|
#include "port.h"
|
|
#include "system_ES8P5066.h"
|
|
#include "systick.h"
|
|
|
|
typedef enum {
|
|
RGB_CLOSE = 0, /*关闭灯*/
|
|
RGB_COLOR_GERRN = 1, /*打开绿灯*/
|
|
RGB_COLOR_BLUE = 2, /*打开蓝灯*/
|
|
RGB_COLOR_RED = 3, /*打开红灯*/
|
|
|
|
} rgb_light_mode_t;
|
|
|
|
typedef enum {
|
|
CLOSE_ALL_LED = 0, /*关闭定时指示灯LED0 LED1 LED2 LED3*/
|
|
OPEN_ONE_LED = 1, /*打开LED0*/
|
|
OPEN_TWO_LED = 2, /*打开LED0 打开LED1*/
|
|
OPEN_THREE_LED = 3, /*打开LED0 打开LED1 打开LED2*/
|
|
OPEN_FOUR_LED = 4, /*打开LED0 打开LED1 打开LED2 打开LED3*/
|
|
} timing_light_mode_t;
|
|
|
|
void light_module_set_rgb_mode(rgb_light_mode_t mode);
|
|
void light_module_set_error_light_mode(bool open, uint8_t error_mode);
|
|
void light_module_set_autoshutdown_indicator_light(bool light);
|
|
void light_module_set_rgb_flicker_mode(bool state);
|
|
void light_module_close_all_light(void);
|
|
void open_green_led(void);
|
|
void close_green_led(void);
|
|
|
|
static timing_light_mode_t get_timing_light_mode_by_lightnum(int number) { return (timing_light_mode_t)number; }
|
|
void light_module_schedule(void);
|
|
|
|
//外部实现
|
|
int hook_get_autoshutdown_timecount();
|
|
|
|
#endif
|