SumProject/my_pro/indicator_led.h

26 lines
933 B
C
Raw Normal View History

2025-01-17 21:37:00 +08:00
#include <rtthread.h>
#include <drv_matrix_led.h>
2025-01-18 00:46:10 +08:00
#define LED_IS_BLINKING 1
#define LED_NOT_BLINKING 0
2025-01-18 11:04:08 +08:00
#define LED_BREATH_ON 1
#define LED_BREATH_OFF 0
2025-01-23 21:00:56 +08:00
#define LED_BREATH_OFF_LASTING 2
2025-01-18 00:46:10 +08:00
2025-01-18 11:04:08 +08:00
#define LED_CHARGE_ID(i) (i+12-1) //电源指示灯序号(1-12)
#define LED_BREATH_ID(i) (i-1) //呼吸灯序号(1-12)
2025-01-18 00:46:10 +08:00
2025-01-23 21:00:56 +08:00
void LED_Set(uint16_t LedId, RGBColor_TypeDef Color);
void LED_SetMore(uint16_t LedId_begin,uint16_t LedId_end, RGBColor_TypeDef Color);
void LED_Blink(uint16_t LedId, RGBColor_TypeDef Color);
void LED_BlinkMore(uint16_t LedId_begin, uint16_t LedId_end, RGBColor_TypeDef Color);
void LED_BreathTurn(uint8_t LedBreath_state);
int led_init(void);
2025-01-17 21:37:00 +08:00
extern const RGBColor_TypeDef LED_OFF;
2025-01-23 21:00:56 +08:00
extern const RGBColor_TypeDef LED_ON;
extern const RGBColor_TypeDef LED_DARK ;
extern const RGBColor_TypeDef LED_GREEN;
extern const RGBColor_TypeDef LED_RED ;
extern const RGBColor_TypeDef LED_BLUE ;
extern const RGBColor_TypeDef LED_WHITE;