Specifications
28
28
USB Descriptors Types
Device descriptor
General info about a USB device (vendor ID,
etc)
Contains info that applies globally to the
device
Only one device descriptor
Configuration descriptor
USB devices can have multiple
configurations
Each configuration contains one or more
interfaces
All associated interface and endpoint
descriptors get loaded with a request from
the host for the configuration descriptor
Contains fields like remote wake-up capability
and max power requirements
Interface descriptor
Lists the endpoint descriptors for the interface
Identifies if the interface belongs to a
predefined Class (such as the Human
Interface Device or HID)
Endpoint descriptor
Info required by host to determine bandwidth
requirements
Describes endpoint number and address, IN
or OUT endpoint and the transfer types
requested
Device
Descriptor
Device
Descriptor
Configuration
Descriptor
Configuration
Descriptor
Interface
Descriptor
Interface
Descriptor
Endpoint
Descriptor
Endpoint
Descriptor
HID Descriptor
HID Descriptor
Report
Descriptor
Report
Descriptor
Physical
Descriptor
Physical
Descriptor
There is a hierarchy of descriptors specified in the USB specification. The device
descriptor is the top level descriptor that has global information about the device, in
particular are the maximum packet size (we touched on this earlier), the VID/PID
combination and serial number. Following the Device Descriptor is the
Configuration descriptor. Devices can have multiple configurations and they are
selected by the host. One of the key points when generating descriptors is that when
the host requests the Configuration Descriptor the device is required to send all of
the interface descriptors associated with that configuration as well as the endpoint
descriptors associated with the interface. The first field in a descriptor is the size of
the descriptor. In the case of the device descriptor the length is defined as the
length of just that descriptor. When the host asks for the configuration descriptor
the length field must be the sum of all of the descriptors to follow including the
configuration descriptor.