USB Component
Version 6.17.0
MDK Middleware for USB Device and Host Communication
|
The Device Descriptor (USB_DEVICE_DESCRIPTOR) is the root of the descriptor tree and contains basic device information. The unique numbers, idVendor and idProduct, identify the connected device. The Windows operating system uses these numbers to determine which device driver must be loaded.
idVendor is the number assigned to each company producing USB-based devices. The USB Implementers Forum is responsible for administering the assignment of Vendor IDs.
The idProduct is another 16-bit field containing a number assigned by the manufacturer to identify a specific product.
Offset | Field | Type | Size | Value | Description |
---|---|---|---|---|---|
0 | bLength | uint8_t | 1 | Number | Size of this descriptor in bytes. |
1 | bDescriptorType | uint8_t | 1 | Constant | Device Descriptor Type = 1. |
2 | bcdUSB | uint16_t | 2 | BCD | USB Specification Release Number in Binary-Coded Decimal (i.e., 2.10 is 210h). This field identifies the release of the USB Specification with which the device and its descriptors are compliant. |
4 | bDeviceClass | uint8_t | 1 | Class | Class code (assigned by the USB-IF). If this field is
|
5 | bDeviceSubClass | uint8_t | 1 | SubClass | Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass field. If bDeviceClass is
|
6 | bDeviceProtocol | uint8_t | 1 | Protocol | Protocol code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass and bDeviceSubClass fields. If a device supports class-specific protocols on a device basis as opposed to an interface basis, this code identifies the protocols that the device uses as defined by the specification of the device class. If this field is
|
7 | bMaxPacketSize0 | uint8_t | 1 | Number | Maximum packet size for Endpoint zero (only 8, 16, 32, or 64 are valid). |
8 | idVendor | uint16_t | 2 | ID | Vendor ID (assigned by the USB-IF). |
10 | idProduct | uint16_t | 2 | ID | Product ID (assigned by the manufacturer). |
12 | bcdDevice | uint16_t | 2 | BCD | Device release number in binary-coded decimal. |
14 | iManufacturer | uint8_t | 1 | Index | Index of string descriptor describing manufacturer. |
15 | iProduct | uint8_t | 1 | Index | Index of string descriptor describing product. |
16 | iSerialNumber | uint8_t | 1 | Index | Index of string descriptor describing the device's serial number. |
17 | bNumConfigurations | uint8_t | 1 | Number | Number of possible configurations. |