#ifndef __hal_led_h__ #define __hal_led_h__ #include #include #include #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_CONNECT, //连接完成灯 LED_SELF_CHECK, //自检灯 LED_OVERTURN, //翻转显示电量 LED_CHARGE, //充电显示电量 LED_PAIR, //匹配完成灯 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