feat(usb): 添加USB CDC功能模块支持

- 在CMakeLists.txt中添加usb_cdc_module、usb_cdc_test_module和
  usb_device_module源文件
- 添加usb_cdc_rx_event、usb_cdc_tx_event、usb_device_state_event、
  usb_function_ready_event和usb_prepare_event事件定义
- 实现USB CDC串口通信功能,包括接收和发送数据处理
- 添加USB设备状态管理,支持连接、断开、激活等状态变化
- 配置设备树中的USB端点数量以支持CDC ACM功能
- 创建USB设备模块用于管理USB堆栈初始化和状态监控
- 添加USB功能就绪事件以协调不同USB功能的准备状态
This commit is contained in:
2026-04-11 17:15:11 +08:00
parent c40fc709d5
commit 33fb416cfa
17 changed files with 1455 additions and 145 deletions

View File

@@ -0,0 +1,21 @@
#ifndef BLINKY_USB_PREPARE_EVENT_H_
#define BLINKY_USB_PREPARE_EVENT_H_
#include <app_event_manager.h>
#include <app_event_manager_profiler_tracer.h>
#ifdef __cplusplus
extern "C" {
#endif
struct usb_prepare_event {
struct app_event_header header;
};
APP_EVENT_TYPE_DECLARE(usb_prepare_event);
#ifdef __cplusplus
}
#endif
#endif /* BLINKY_USB_PREPARE_EVENT_H_ */