12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef __hal_led_h__
- #define __hal_led_h__
- #include <stdbool.h>
- #include <stdint.h>
- #include <string.h>
- #include "sdk_common.h"
- #include "SEGGER_RTT.h"
- #include "usr_config.h"
- //ARGB
- //#define COLOR_BLACK 0xFF000000
- //#define COLOR_WHITE 0xFF070707
- //#define COLOR_RED 0xFF070000
- //#define COLOR_GREEN 0xFF000700
- //#define COLOR_BLUE 0xFF000007
- //#define COLOR_ORANGE 0xFF070300
- //#define COLOR_PURPLE 0xFF070007
- //#define COLOR_YELLOW 0xFF070700
- //#define COLOR_CYAN 0xFF000707
- //#define COLOR_BLACK 0xFF000000
- //#define COLOR_WHITE 0xFFFFFFFF
- //#define COLOR_RED 0xFFFF0000
- //#define COLOR_GREEN 0xFF00FF00
- //#define COLOR_BLUE 0xFF0000FF
- //#define COLOR_ORANGE 0xFFFF6000
- //#define COLOR_PURPLE 0xFFFF00FF
- //#define COLOR_YELLOW 0xFFFFFF00
- //#define COLOR_CYAN 0xFF00FFFF
- #define COLOR_BLACK 0xFF000000
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_RED 0xFFFF0000
- #define COLOR_LIGHRED 0xFF070000
- #define COLOR_GREEN 0xFF007F00
- #define COLOR_BLUE 0xFF0000FF
- #define COLOR_ORANGE 0xFF6F1000
- #define COLOR_PURPLE 0xFFFF00FF
- #define COLOR_YELLOW 0xFFFFFF00
- #define COLOR_CYAN 0xFF000707
- ////显示优先级 0~250
- //enum {
- // LED_PRIO_NONE = 0, //保留
- // LED_PRIO_OVERTURN, //翻转显示电量
- // LED_PRIO_CHARGE, //充电显示电量
- //
- //};
- //显示优先级 0~250
- enum {
- LED_NONE = 0, //保留
- LED_RUN, //测试灯
- LED_CHARGE, //充电显示电量
- LED_OVERTURN, //翻转显示电量
- LED_CONNECT, //连接完成灯
- LED_CONFIG, //匹配完成灯
- LED_SELF_CHECK, //自检灯
- LED_EXCEPT, //故障灯
- LED_NUM_OF_LED, //LED成员变量
- };
- void LED_Init(void);
- void LED_Stop(uint8_t n);
- void LED_Start(uint8_t n,uint32_t color);
- void LED_Close_Enforce(void);
- void LED_SetColor(uint8_t n,uint32_t color);
- #endif
|