1e41f4b71Sopenharmony_ci# UsbConfigDescriptor
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciDefines standard configuration descriptors, which correspond to **Standard Configuration Descriptor** in the USB protocol.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**Since**
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci10
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**Related Modules**
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci[USB DDK](_usb_ddk.md)
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci## Summary
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci### Member Variables
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci| Name| Description|
23e41f4b71Sopenharmony_ci| -------- | -------- |
24e41f4b71Sopenharmony_ci| [bLength](#blength) | Size of the descriptor, in bytes.|
25e41f4b71Sopenharmony_ci| [bDescriptorType](#bdescriptortype) | Descriptor type.|
26e41f4b71Sopenharmony_ci| [wTotalLength](#wtotallength) | Total length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.|
27e41f4b71Sopenharmony_ci| [bNumInterfaces](#bnuminterfaces) | Number of interfaces supported by the configuration.|
28e41f4b71Sopenharmony_ci| [bConfigurationValue](#bconfigurationvalue) | Configuration index, which is used to select the configuration.|
29e41f4b71Sopenharmony_ci| [iConfiguration](#iconfiguration) | Index of the string descriptor that describes the configuration.|
30e41f4b71Sopenharmony_ci| [bmAttributes](#bmattributes) | Configuration attributes, including the power mode and remote wakeup.|
31e41f4b71Sopenharmony_ci| [bMaxPower](#bmaxpower) | Maximum power consumption of the bus-powered USB device, in 2 mA.|
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci## Member Variable Description
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci### bConfigurationValue
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci```
41e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bConfigurationValue
42e41f4b71Sopenharmony_ci```
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci**Description**
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ciConfiguration index, which is used to select the configuration.
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci### bDescriptorType
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci
52e41f4b71Sopenharmony_ci```
53e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bDescriptorType
54e41f4b71Sopenharmony_ci```
55e41f4b71Sopenharmony_ci
56e41f4b71Sopenharmony_ci**Description**
57e41f4b71Sopenharmony_ci
58e41f4b71Sopenharmony_ciDescriptor type.
59e41f4b71Sopenharmony_ci
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci### bLength
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ci
64e41f4b71Sopenharmony_ci```
65e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bLength
66e41f4b71Sopenharmony_ci```
67e41f4b71Sopenharmony_ci
68e41f4b71Sopenharmony_ci**Description**
69e41f4b71Sopenharmony_ci
70e41f4b71Sopenharmony_ciSize of the descriptor, in bytes.
71e41f4b71Sopenharmony_ci
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci### bmAttributes
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ci
76e41f4b71Sopenharmony_ci```
77e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bmAttributes
78e41f4b71Sopenharmony_ci```
79e41f4b71Sopenharmony_ci
80e41f4b71Sopenharmony_ci**Description**
81e41f4b71Sopenharmony_ci
82e41f4b71Sopenharmony_ciConfiguration attributes, including the power mode and remote wakeup.
83e41f4b71Sopenharmony_ci
84e41f4b71Sopenharmony_ci
85e41f4b71Sopenharmony_ci### bMaxPower
86e41f4b71Sopenharmony_ci
87e41f4b71Sopenharmony_ci
88e41f4b71Sopenharmony_ci```
89e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bMaxPower
90e41f4b71Sopenharmony_ci```
91e41f4b71Sopenharmony_ci
92e41f4b71Sopenharmony_ci**Description**
93e41f4b71Sopenharmony_ci
94e41f4b71Sopenharmony_ciMaximum power consumption of the bus-powered USB device, in 2 mA.
95e41f4b71Sopenharmony_ci
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_ci### bNumInterfaces
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ci
100e41f4b71Sopenharmony_ci```
101e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::bNumInterfaces
102e41f4b71Sopenharmony_ci```
103e41f4b71Sopenharmony_ci
104e41f4b71Sopenharmony_ci**Description**
105e41f4b71Sopenharmony_ci
106e41f4b71Sopenharmony_ciNumber of interfaces supported by the configuration.
107e41f4b71Sopenharmony_ci
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ci### iConfiguration
110e41f4b71Sopenharmony_ci
111e41f4b71Sopenharmony_ci
112e41f4b71Sopenharmony_ci```
113e41f4b71Sopenharmony_ciuint8_t UsbConfigDescriptor::iConfiguration
114e41f4b71Sopenharmony_ci```
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ci**Description**
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ciIndex of the string descriptor that describes the configuration.
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ci### wTotalLength
122e41f4b71Sopenharmony_ci
123e41f4b71Sopenharmony_ci
124e41f4b71Sopenharmony_ci```
125e41f4b71Sopenharmony_ciuint16_t UsbConfigDescriptor::wTotalLength
126e41f4b71Sopenharmony_ci```
127e41f4b71Sopenharmony_ci
128e41f4b71Sopenharmony_ci**Description**
129e41f4b71Sopenharmony_ci
130e41f4b71Sopenharmony_ciTotal length of the configuration descriptor, including the configuration, interface, endpoint, and class- or vendor-specific descriptors.
131