新闻详情

新闻详情

首页 / 资讯中心 / 详情

the USB CDC-ACM descriptor layout

发布时间:2026/9/26 11:09:31来源:尧图网络
the USB CDC-ACM descriptor layout
For aUSB CDC-ACM (Virtual COM Port)device, the descriptor hierarchy typically looks like this:Device Descriptor │ └── Configuration Descriptor │ ├── Interface 0 (Communication Class Interface, CIC) │ ├── Header Functional Descriptor │ ├── Call Management Functional Descriptor │ ├── ACM Functional Descriptor │ ├── Union Functional Descriptor │ └── Endpoint Descriptor (Interrupt IN) │ └── Interface 1 (Data Class Interface, DIC) ├── Endpoint Descriptor (Bulk OUT) └── Endpoint Descriptor (Bulk IN)Example CDC-ACM Descriptor SetCommunication Interface (Interface 0)Interface Descriptor -------------------- bInterfaceClass 0x02 (CDC) bInterfaceSubClass 0x02 (ACM) bInterfaceProtocol 0x01 (AT Commands) bNumEndpoints 1Header Functional DescriptorbFunctionLength 5 bDescriptorType 0x24 (CS_INTERFACE) bDescriptorSubType 0x00 (Header) bcdCDC 0x0120Call Management DescriptorbFunctionLength 5 bDescriptorType 0x24 bDescriptorSubType 0x01 bmCapabilities 0x00 bDataInterface 1ACM Functional DescriptorbFunctionLength 4 bDescriptorType 0x24 bDescriptorSubType 0x02 bmCapabilities: bit0 Supports Set_Line_Coding bit1 Supports Set_Control_Line_State bit2 Supports Send_BreakCommon value:bmCapabilities 0x02 Union Functional DescriptorbFunctionLength 5 bDescriptorType 0x24 bDescriptorSubType 0x06 bMasterInterface 0 bSlaveInterface0 1Notification EndpointEndpoint Descriptor ------------------- bEndpointAddress 0x81 (Interrupt IN) bmAttributes 0x03 wMaxPacketSize 8 bInterval 16Data Interface (Interface 1)Interface Descriptor -------------------- bInterfaceClass 0x0A (CDC Data) bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 bNumEndpoints 2Bulk OUT EndpointbEndpointAddress 0x02 bmAttributes 0x02 (Bulk) wMaxPacketSize 64 (FS)Bulk IN EndpointbEndpointAddress 0x82 bmAttributes 0x02 (Bulk) wMaxPacketSize 64 (FS)Descriptor Byte LayoutMany STM32/NXP/ESP32 examples use something close to:/* Interface Association Descriptor (optional) */ 08 0B 00 02 02 02 01 00 /* Communication Interface */ 09 04 00 00 01 02 02 01 00 ** Header Functional */ 05 *4 00 20 01 /* Call Management */ 05 *4 01 00 01 /* ACM */ 04 24 02 02 /* Union */ 05 24 06 00 01 /* Interrupt IN EP */ 07 05*81 03 08 00 10* /* Data Interface */ 09 04 01 00 02 0A 00 00 00 /* Bulk OUT */ 07 05 02 02 40 00 00 /* Bulk IN */ 07 05 82 02 40 00 00Enumeration Result in Windows/LinuxAfter enumeration, the host issues CDC class requests such as:SET_LINE_CODING GET_LINE_CODING SET_CONTROL_LINE_STATE SEND_BREAKSET_LINE_CODINGcarries UART settings:dwDTERate 115200 bCharFormat 0 *(1 stop bit) bParityType 0 (none) bDataBits 8 This is why CDC-ACM appears as aCOM portin Windows and as/dev/ttyACM0in Linux. The actual UART settings are often ignored by MCU firmware unless bridged to a real UART. The CDC ACM subclass is defined within the USB Communications Device Class specification. [usb.org], [cscott.net]Common Endpoint MapEP0 Control EP1*IN Interrupt (Notifications) EP2*OUT Bulk (Host - Device data) EP2*IN Bulk (Device - Host data)This is the descriptor structure youll see in STM32Cube USB CDC, TinyUSB CDC-ACM, Zephyr USB CDC, Linux gadget CDC-ACM, and most MCU virtual COM port implementations.
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

Linux火焰图实战:从原理到Java性能排查 2026/9/26 12:07:08

Linux火焰图实战:从原理到Java性能排查

1. 为什么学了这么多年Linux,我还是强烈建议你掌握火焰图大概半年前,我接手一个Java线上服务,高峰期CPU直接飙到300%以上,top命令里看到的是java进程占满,但具体是哪段代码在烧CPU,完全抓瞎。按老套路&…

阅读更多 →
移动端Canvas画板批注PDF预览:坐标系对齐与数据存储实战 2026/9/26 12:07:07

移动端Canvas画板批注PDF预览:坐标系对齐与数据存储实战

简介:这是一份面向移动端 H5 开发者的 Canvas 画板批注 PDF 预览实战资源,适合需要在小程序、WebView 或移动浏览器中实现 PDF 阅读与手写批注功能的初中级前端工程师。资源围绕 PDF.js 解析渲染与 Canvas 触控绘图两条主线展开,涵盖 PDF 文档…

阅读更多 →
EasyPlayer.js H5播放器接入指南:RTMP/FLV/HLS协议与解码实践 2026/9/26 12:07:06

EasyPlayer.js H5播放器接入指南:RTMP/FLV/HLS协议与解码实践

简介:EasyPlayer.js是一套面向网页开发的H5播放器源码包,能够同时支持HTTP-FLV、WS-FLV、HLS(m3u8)等直播与点播协议,兼容H.264、H.265、AAC等编码格式,并提供MSE、WASM等多种解码方式,可运行于…

阅读更多 →
Flutter鸿蒙适配指南:图片平铺的四种实现与性能优化 2026/9/26 12:07:05

Flutter鸿蒙适配指南:图片平铺的四种实现与性能优化

1. 图片重复模式:表面是平铺,背后是纹理采样1.1 平铺需求在真实项目里有多常见先别急着把它当成一个简单题目。图片重复模式(也就是 Flutter 里的 ImageRepeat)在项目里出现的频率远比你想象的高:聊天界面底纹、登录页…

阅读更多 →
智能体开发之MCP协议从理论到实践:TaoToken统一Key接入Cline配置指南 2026/9/26 12:07:03

智能体开发之MCP协议从理论到实践:TaoToken统一Key接入Cline配置指南

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →
AI检测为何一查一个准?从困惑度到人味写作的降AIGC实用流程 2026/9/26 12:06:57

AI检测为何一查一个准?从困惑度到人味写作的降AIGC实用流程

先说个现象:这两年高校对AIGC痕迹的核查越来越普遍,很多本科生写课程论文、开题报告、结课作业时,都会收到“AI检测偏高”的反馈。于是“2026必备10个降AIGC工具”这类标题满天飞,评论区全是求链接、求教程的。但我在帮学弟学妹和…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉