Files
blinky/inc/events/led_strip_en_event.h
skiinder ff8f0d81d7 feat: 添加LED灯带模块支持
- 在CMakeLists.txt中添加led_strip_module.c源文件和led_strip_en_event.c事件文件
- 在设备树配置中添加SPI1接口的WS2812灯带引脚控制配置
- 在板级配置文件中添加LED灯带设备节点和别名定义
- 新增led_strip_en_event事件头文件和实现,用于控制灯带使能状态
- 配置prj.conf启用LED Strip和WS2812 SPI驱动
- 实现完整的LED灯带模块功能,包括:
  - 初始化和电源管理
  - RGB色彩效果渲染
  - 通过GPIO控制灯带供电
  - 响应应用事件进行启停控制
2026-04-13 15:23:46 +08:00

25 lines
412 B
C

#ifndef BLINKY_LED_STRIP_EN_EVENT_H_
#define BLINKY_LED_STRIP_EN_EVENT_H_
#include <stdbool.h>
#include <app_event_manager.h>
#include <app_event_manager_profiler_tracer.h>
#ifdef __cplusplus
extern "C" {
#endif
struct led_strip_en_event {
struct app_event_header header;
bool enabled;
};
APP_EVENT_TYPE_DECLARE(led_strip_en_event);
#ifdef __cplusplus
}
#endif
#endif /* BLINKY_LED_STRIP_EN_EVENT_H_ */