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