#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 ////显示优先级 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_CONFIG, //匹配完成灯 LED_CONNECT, //连接完成灯 LED_GAME, MEMBER_NUM_OF_LED, //LED成员变量 }; typedef struct _LED{ uint8_t onoff; uint8_t R; uint8_t G; uint8_t B; uint8_t pwm; uint32_t color; //颜色 }LED_t; void LED_Init(void); void LED_Start(uint8_t n); void LED_Stop(uint8_t n); void LED_SetColor(uint8_t n,uint32_t color); void LED_Close_Enforce(void); #endif