- 云台(ROBOT_TYPE_GIMBAL)与底盘(ROBOT_TYPE_CHASSIS)完整固件源码 - 新增根级 .gitignore,排除 Keil MDK-ARM 构建产物(.o/.d/.crf/.axf/.lnp/.map/.htm/.sct/.dep/.iex/.lst 等) 与 *.uvguix.* / DebugConfig/(与机器绑定的 UI 布局) - core.autocrlf=false,避免固件源码在检出时被改动换行符
18 lines
637 B
C
18 lines
637 B
C
#ifndef LED_H
|
|
#define LED_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* C 板 RGB LED(TIM5 CH1/2/3 -> PH10 蓝 / PH11 绿 / PH12 红,低电平点亮经 PWM 实现)
|
|
* 与 legacy LED_SetColor 映射一致 */
|
|
|
|
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
|