我找到了一个描述符,如下所示。
据我所知,当 bDescriptorType 为 0x04 时,表示接口描述符。
如果 bDescriptorType 是 0x24,那是什么意思?
我在 USB 规范 2.0 中找不到相关描述。
/* First Interface Descriptor For Comm Class Interface */
0x09, /* bLength = 9 */
0x04, /* bDescriptorType = Interface (4) */
0x00, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x01, /* bNumEndpoints (one for OUT) */
0x02, /* bInterfaceClass = Communications Interface Class (2) */
0x02, /* bInterfaceSubClass = Abstract Control Model (2) */
0x01, /* bInterfaceProtocol = Common "AT" commands (1), */
/* no class specific protocol (0) */
0x00, /* iInterface */
/* Header Functional Descriptor */
0x05, /* bFunctionalLength = 5 */
0x24, /* bDescriptorType */
0x00, /* bDescriptorSubtype */
0x10, 0x01, /* bcdCDC */
Run Code Online (Sandbox Code Playgroud)
值 0x24 表示它是特定于类的接口描述符。请参阅 CDC 1.20 规范中表 12 中 CS_INTERFACE 的定义。你可以在这里找到它:
http://www.usb.org/developers/docs/devclass_docs/
请注意,在这些 USB 标准中,0x24 通常写为“24h”。