USB 描述符类型编号大全
2021-10-15
9239
2
USB规范定义了不同的描述符,如设备描述符为1,配置描述符为2,字符串描述符为3,接口描述符为4,端点描述符为5…,,他们的类别编号定义如下:
USB2.0规范定义的描述符类型
描述符类型 | 值 |
---|---|
DEVICE | 1 |
CONFIGURATION | 2 |
STRING | 3 |
INTERFACE | 4 |
ENDPOINT | 5 |
DEVICE_QUALIFIER | 6 |
OTHER_SPEED_CONFIGURATION | 7 |
INTERFACE_POWER1 | 8 |
HID_HID_DESCRIPTOR_TYPE | 0x21 |
HID_REPORT_DESCRIPTOR_TYPE | 0x22 |
HID_PHYSICAL_DESCRIPTOR_TYPE | 0x23 |
USB3.2规范定义描述符类型
描述符类型 | 值 |
---|---|
DEVICE | 1 |
CONFIGURATION | 2 |
STRING | 3 |
INTERFACE | 4 |
ENDPOINT | 5 |
Reserved | 6 |
Reserved | 7 |
INTERFACE_POWER1 | 8 |
OTG | 9 |
DEBUG | 10 |
INTERFACE_ASSOCIATION | 11 |
BOS | 15 |
DEVICE CAPABILITY | 16 |
SUPERSPEED_USB_ENDPOINT_COMPANION | 48 |
SUPERSPEEDPLUS_ISOCHRONOUS_ENDPOINT_COMPANION | 49 |
Windows头文件定义的描述符类型
Windows中usbspec.h定义如下:
//
// USB 1.1: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
//
#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
#define USB_STRING_DESCRIPTOR_TYPE 0x03
#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
//
// USB 2.0: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
//
#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
#define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07
#define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
//
// USB 3.0: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
//
#define USB_OTG_DESCRIPTOR_TYPE 0x09
#define USB_DEBUG_DESCRIPTOR_TYPE 0x0A
#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
#define USB_BOS_DESCRIPTOR_TYPE 0x0F
#define USB_DEVICE_CAPABILITY_DESCRIPTOR_TYPE 0x10
#define USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x30
//
// USB 3.1: 9.4 Standard Device Requests, Table 9-6. Descriptor Types
//
#define USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x31
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936