USB Component  Version 5.0
MDK-Professional Middleware for USB Device and Host
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
Configuration Descriptor

The Configuration Descriptor contains information about the device power requirements and the number of interfaces it can support. A device can have multiple configurations. The host can select the configuration that best matches the requirements of the application software.

Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor in bytes.
1 bDescriptorType 1 Constant Configuration Descriptor Type.
2 wTotalLength 2 Number Total length of data returned for this configuration. Includes the combined length of all descriptors (configuration, interface, endpoint, and class- or vendor-specific) returned for this configuration.
4 bNumInterfaces 1 Number Number of interfaces supported by this configuration.
5 bConfigurationValue 1 Number Value to select this configuration with SetConfiguration().
6 iConfiguration 1 Index Index of string descriptor describing this configuration.
7 bmAttributes 1 Bitmap

Configuration characteristics

  • D7: Reserved (must be set to one for historical reasons)
  • D6: Self-powered
  • D5: Remote Wakeup
  • D4...0: Reserved (reset to zero)

A device configuration that uses power from the bus and a local source reports a non-zero value in bMaxPower to indicate the amount of bus power required and sets D6. The actual power source at runtime can be determined using the GetStatus(DEVICE) request. If a device configuration supports remote wakeup, D5 is set to 1.

8 bMaxPower 1 mA Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. Expressed in 2mA units (i.e., 50 = 100mA).