当前位置 博文首页 > dadalaohua的博客:【USB描述符系列】一个CP210x的USB转串口
看了下手头的一个CP210x芯片的USB转串口模块的USB描述符有没有什么差异。从描述符上看,和其他USB转UART的模块的USB描述符都差不多,都是厂商自定义类Vendor specific class,在很多系统上都没法免驱。这个模块是一个Full Speed设备,传输数据使用bulk传输,具体的可以看USB描述符信息。
下面是这个Silicon Labs CP210x USB to UART Bridge的USB描述符。
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 12h | Size of this descriptor |
1 | bDescriptorType | 1 | 01h | Device |
2 | bcdUSB | 2 | 0110h | USB Spec 1.1 |
4 | bDeviceClass | 1 | 00h | Class info in Ifc Descriptors |
5 | bDeviceSubClass | 1 | 00h | Unused |
6 | bDeviceProtocol | 1 | 00h | Unused |
7 | bMaxPacketSize0 | 1 | 08h | 8 bytes |
8 | idVendor | 2 | 10C4h | Vendor ID:Cygnal Integrated Products, Inc. |
10 | idProduct | 2 | EA60h | Product ID |
12 | bcdDevice | 2 | 0100h | 1.00 |
14 | iManufacturer | 1 | 01h | Index to string descriptor that contains the string < Your Name > in Unicode |
15 | iProduct | 1 | 02h | Index to string descriptor that contains the string < Your Product Name > in Unicode |
16 | iSerialNumber | 1 | 03h | Index to string descriptor that contains the string < Your Serial Number > in Unicode |
17 | bNumConfigurations | 1 | 01h | One configuration |
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | Size of this descriptor |
1 | bDescriptorType | 1 | 02h | Configuration |
2 | wTotalLength | 2 | 0020h | Length of the total configuration block, including this descriptor, in bytes |
4 | bNumInterfaces | 1 | 01h | One interfaces |
5 | bConfigurationValue | 1 | 01h | ID of this configuration |
6 | iConfiguration | 1 | 00h | Unused |
7 | bmAttributes | 1 | 80h | Bus Powered |
4…0: Reserved | . . . 00000 | Unused | ||
5: Remote Wakeup | . .0 . . . . . | No | ||
6: Self Powered | . 0 . . . . . . | No, Bus Powered | ||
7: Reserved (set to one) (bus-powered for 1.0) | 1 . . . . . . . | Unused | ||
8 | bMaxPower | 1 | 32h | 100 mA |
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 09h | Size of this descriptor |
1 | bDescriptorType | 1 | 04h | INTERFACE |
2 | bInterfaceNumber | 1 | 00h | Index of this interface |
3 | bAlternateSetting | 1 | 00h | Index of this setting |
4 | bNumEndpoints | 1 | 02h | 2 endpoints |
5 | bInterfaceClass | 1 | FFh | Vendor-Specific |
6 | bInterfaceSubClass | 1 | 00h | Vendor-Specific |
7 | bInterfaceProtocol | 1 | 00h | Vendor-Specific |
8 | iInterface | 1 | 02h | Index of string descriptor describing this interface |
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | Size of this descriptor |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 81h | 1 In |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | . . . . . .10 | Bulk | ||
7…2: Reserved | 000000 . . | Unused | ||
4 | wMaxPacketSize | 2 | 0040h | 64 bytes |
6 | bInterval | 1 | 00h | Unused |
Offset | Field | Size | Value | Description |
---|---|---|---|---|
0 | bLength | 1 | 07h | Size of this descriptor |
1 | bDescriptorType | 1 | 05h | Endpoint |
2 | bEndpointAddress | 1 | 02h | 2 Out |
3 | bmAttributes | 1 | 02h | Bulk |
1…0: Transfer Type | . . . . . .10 | Bulk | ||
7…2: Reserved | 000000 . . | Unused | ||
4 | wMaxPacketSize | 2 | 0040h | 64 bytes |
6 | bInterval | 1 | 00h | Unused |
本文链接:https://blog.csdn.net/u012028275/article/details/115593403
cs