Information Technology Reference
In-Depth Information
descriptor, at least two endpoint descriptors, and at least one string descrip-
tor in addition to string descriptor zero.
In the descriptors, multi-byte numeric values transmit in little-endian for-
mat, with the least-significant-byte (LSB) first. For example, if a device's
Product ID is 1234h, byte 10 in the device descriptor contains 34h and byte
11 contains 12h.
Device Descriptor
The device descriptor contains information about the device, its configura-
tions, and any classes the device belongs to as a whole. Table 3-1 shows the
fields in the device descriptor. Here are more details about the fields and
how they're used in a mass-storage device:
bLength. The length in bytes of the descriptor. Always 12h.
bDescriptorType. The constant DEVICE (01h).
bcdUSB. The USB specification version that the device and its descriptors
comply with in BCD (binary-coded decimal) format. If you think of the
version's value as a decimal number, the upper byte represents the integer,
the next four bits are tenths, and the final four bits are hundredths. Version
2.0 is 0200h. A 2.0 device does not have to be high speed. Any new
full-speed mass-storage device should comply with the latest version of the
specification.
bDeviceClass. For devices whose function is defined at the device level, this
field specifies the device's class. Many devices, including mass-storage
devices, specify their class in the interface descriptor and set the bDevice-
Class field in the device descriptor to 00h.
bDeviceSubclass. A subclass within bDeviceClass. In mass-storage devices,
this field is 00h.
bDeviceProtocol. A protocol defined by a class or subclass. In mass-storage
devices, this field is 00h.
bMaxPacketSize0. The maximum packet size for endpoint zero. Full-speed
devices may use 08h, 10h, 20h, or 40h. High-speed devices must use 40h.
Search WWH ::




Custom Search