USB_CONFIGURATION_DESCRIPTOR structure

The USB_CONFIGURATION_DESCRIPTOR structure is used by USB client drivers to hold a USB-defined configuration descriptor.

Syntax


typedef struct _USB_CONFIGURATION_DESCRIPTOR {
  UCHAR  bLength;
  UCHAR  bDescriptorType;
  USHORT wTotalLength;
  UCHAR  bNumInterfaces;
  UCHAR  bConfigurationValue;
  UCHAR  iConfiguration;
  UCHAR  bmAttributes;
  UCHAR  MaxPower;
} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;

Members

bLength

Specifies the length, in bytes, of this structure.

bDescriptorType

Specifies the descriptor type. Must be set to USB_CONFIGURATION_DESCRIPTOR_TYPE.

wTotalLength

Specifies the total length, in bytes, of all data for the configuration. The length includes all interface, endpoint, class, or vendor-specific descriptors that are returned with the configuration descriptor.

bNumInterfaces

Specifies the total number of interfaces supported by this configuration.

bConfigurationValue

Contains the value that is used to select a configuration. This value is passed to the USB SetConfiguration request , as described in version 1.1 of the Universal Serial Bus Specification. The port driver does not currently expose a service that allows higher-level drivers to set the configuration.

iConfiguration

Specifies the device-defined index of the string descriptor for this configuration.

bmAttributes

Specifies a bitmap to describe behavior of this configuration. The bits are described and set in little-endian order.

BitMeaning

0 - 4

Reserved.

5

The configuration supports remote wakeup.

6

The configuration is self-powered and does not use power from the bus.

7

The configuration is powered by the bus.

 

MaxPower

Specifies the power requirements of this device in two-milliampere units. This member is valid only if bit seven is set in bmAttributes.

Remarks

If wTotalLength is greater than the buffer size provided in the URB to hold all descriptors retrieved (interface, endpoint, class, and vendor-defined), incomplete data will be returned. In order to retrieve complete descriptors, the request will need to be re-sent with a larger buffer.

If bmAttributes bits six and seven are both set, then the device is powered both by the bus and by a source external to the bus.

Other members that are part of this structure but not described here should be treated as opaque and considered to be reserved for system use.

Requirements

Header

Usb100.h (include Usb100.h)

See also

UsbBuildGetDescriptorRequest
USBD_CreateConfigurationRequest
USB Structures

 

 

Send comments about this topic to Microsoft

Show: