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

@@ -225,9 +225,14 @@
&usbd {
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <2>;
num-out-endpoints = <1>;
num-bidir-endpoints = <1>;
num-in-endpoints = <7>;
num-out-endpoints = <7>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};