代码风格更新以及加入超电的对接
This commit is contained in:
1 parent
957c535bda
commit
9de485e4ef
117 files changed
+9046
-6457
No files matched your search
@@ -3,15 +3,12 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* C 板 RGB LED(TIM5 CH1/2/3 -> PH10 蓝 / PH11 绿 / PH12 红,低电平点亮经 PWM 实现)
|
||||
* 与 legacy LED_SetColor 映射一致 */
|
||||
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-灭)
|
||||
|
||||
extern void led_init(void); /* 配置 TIM5 为 1kHz PWM */
|
||||
/* 若尚未初始化则先初始化(可在任意上下文安全调用,供传感器报警等早期使用) */
|
||||
extern void led_ensure_init(void);
|
||||
extern void led_set_color(uint8_t r, uint8_t g, uint8_t b); /* 0~255 */
|
||||
extern void led_set_all_off(void);
|
||||
extern void led_set_red(uint8_t on);
|
||||
extern void led_set_green(uint8_t on);
|
||||
extern void led_set_blue(uint8_t on);
|
||||
#endif
|
||||
Reference in new issue
Block a user