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:
22
inc/events/usb_cdc_tx_event.h
Normal file
22
inc/events/usb_cdc_tx_event.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef BLINKY_USB_CDC_TX_EVENT_H_
|
||||
#define BLINKY_USB_CDC_TX_EVENT_H_
|
||||
|
||||
#include <app_event_manager.h>
|
||||
#include <app_event_manager_profiler_tracer.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct usb_cdc_tx_event {
|
||||
struct app_event_header header;
|
||||
struct event_dyndata dyndata;
|
||||
};
|
||||
|
||||
APP_EVENT_TYPE_DYNDATA_DECLARE(usb_cdc_tx_event);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BLINKY_USB_CDC_TX_EVENT_H_ */
|
||||
Reference in New Issue
Block a user