1# UsbConfigDescriptor 2 3 4## 概述 5 6标准配置描述符,对应USB协议中Standard Configuration Descriptor。 7 8**起始版本:** 9 1010 11 12**相关模块:** 13 14[USB DDK](_usb_ddk.md) 15 16**所在头文件:** [usb_ddk_types.h](usb__ddk__types_8h.md) 17 18 19## 汇总 20 21 22### 成员变量 23 24| 名称 | 描述 | 25| -------- | -------- | 26| [bLength](#blength) | 该描述符的大小,单位为字节。 | 27| [bDescriptorType](#bdescriptortype) | 描述符类型。 | 28| [wTotalLength](#wtotallength) | 该配置描述符的总长度,包含配置、接口、端点和特定于类或供应商的描述符。 | 29| [bNumInterfaces](#bnuminterfaces) | 该配置所支持的接口数量。 | 30| [bConfigurationValue](#bconfigurationvalue) | 设置配置所需要的参数,用来选择当前配置。 | 31| [iConfiguration](#iconfiguration) | 描述该配置的字符串描述符的索引。 | 32| [bmAttributes](#bmattributes) | 配置属性,包含供电模式、远程唤醒等配置。 | 33| [bMaxPower](#bmaxpower) | 总线供电的USB设备的最大功耗,以2mA为单位。 | 34 35 36## 结构体成员变量说明 37 38 39### bConfigurationValue 40 41 42``` 43uint8_t UsbConfigDescriptor::bConfigurationValue 44``` 45 46**描述:** 47 48设置配置所需要的参数,用来选择当前配置。 49 50 51### bDescriptorType 52 53 54``` 55uint8_t UsbConfigDescriptor::bDescriptorType 56``` 57 58**描述:** 59 60描述符类型。 61 62 63### bLength 64 65 66``` 67uint8_t UsbConfigDescriptor::bLength 68``` 69 70**描述:** 71 72该描述符的大小,单位为字节。 73 74 75### bmAttributes 76 77 78``` 79uint8_t UsbConfigDescriptor::bmAttributes 80``` 81 82**描述:** 83 84配置属性,包含供电模式、远程唤醒等配置。 85 86 87### bMaxPower 88 89 90``` 91uint8_t UsbConfigDescriptor::bMaxPower 92``` 93 94**描述:** 95 96总线供电的USB设备的最大功耗,以2mA为单位。 97 98 99### bNumInterfaces 100 101 102``` 103uint8_t UsbConfigDescriptor::bNumInterfaces 104``` 105 106**描述:** 107 108该配置所支持的接口数量。 109 110 111### iConfiguration 112 113 114``` 115uint8_t UsbConfigDescriptor::iConfiguration 116``` 117 118**描述:** 119 120描述该配置的字符串描述符的索引。 121 122 123### wTotalLength 124 125 126``` 127uint16_t UsbConfigDescriptor::wTotalLength 128``` 129 130**描述:** 131 132该配置描述符的总长度,包含配置、接口、端点和特定于类或供应商的描述符。 133