15 lines
517 B
C
15 lines
517 B
C
#ifndef LED_H
|
|
#define LED_H
|
|
|
|
#include <stdint.h>
|
|
|
|
void led_init(void);//初始化TIM5三通道为1kHz PWM
|
|
void led_ensure_init(void);//若LED尚未初始化则先执行初始化(供早期报警安全调用)
|
|
void led_set_color(uint8_t r, uint8_t g, uint8_t b);//设置RGB三色亮度(0~255)
|
|
void led_set_all_off(void);//熄灭全部LED
|
|
void led_set_red(uint8_t on);//开关红灯(1-亮,0-灭)
|
|
void led_set_green(uint8_t on);//开关绿灯(1-亮,0-灭)
|
|
void led_set_blue(uint8_t on);//开关蓝灯(1-亮,0-灭)
|
|
|
|
#endif
|