_usb_device_descriptor.md 3.6 KB
Newer Older
W
wuchengwen 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
# UsbDeviceDescriptor


## 概述

标准设备描述符,对应USB协议中Standard Device Descriptor。

**起始版本:**

10

**相关模块:**

[UsbDdk](_usb_ddk.md)


## 汇总


### 成员变量

| 名称 | 描述 |
| -------- | -------- |
| [bLength](#blength) | 该描述符的大小,单位为字节。 |
| [bDescriptorType](#bdescriptortype) | 描述符类型。 |
| [bcdUSB](#bcdusb) | USB协议发布号。 |
| [bDeviceClass](#bdeviceclass) | 由USB标准化组织(USB-IF)分配的设备类代码。 |
| [bDeviceSubClass](#bdevicesubclass) | 由USB标准化组织(USB-IF)分配的子类代码,其值由[bDeviceClass](#bdeviceclass)的值限定。 |
| [bDeviceProtocol](#bdeviceprotocol) | 由USB标准化组织(USB-IF)分配的协议代码,其值由[bDeviceClass](#bdeviceclass)[bDeviceSubClass](#bdevicesubclass)的值限定。 |
| [bMaxPacketSize0](#bmaxpacketsize0) | 端点零的最大包大小,只有8,16,32,64是合法的。 |
| [idVendor](#idvendor) | 由USB标准化组织(USB-IF)分配的厂商编号。 |
| [idProduct](#idproduct) | 由厂商分配的产品编号。 |
| [bcdDevice](#bcddevice) | 设备发布编号。 |
| [iManufacturer](#imanufacturer) | 描述厂商的字符串描述符的索引。 |
| [iProduct](#iproduct) | 描述产品的字符串描述符的索引。 |
| [iSerialNumber](#iserialnumber) | 描述设备序列号的字符串描述符的索引。 |
| [bNumConfigurations](#bnumconfigurations) | 配置数量。 |


## 结构体成员变量说明


### bcdDevice


```
uint16_t UsbDeviceDescriptor::bcdDevice
```

**描述:**

设备发布编号。


### bcdUSB


```
uint16_t UsbDeviceDescriptor::bcdUSB
```

**描述:**

USB协议发布号。


### bDescriptorType


```
uint8_t UsbDeviceDescriptor::bDescriptorType
```

**描述:**

描述符类型。


### bDeviceClass


```
uint8_t UsbDeviceDescriptor::bDeviceClass
```

**描述:**

由USB标准化组织(USB-IF)分配的设备类代码。


### bDeviceProtocol


```
uint8_t UsbDeviceDescriptor::bDeviceProtocol
```

**描述:**

由USB标准化组织(USB-IF)分配的协议代码,其值由[bDeviceClass](#bdeviceclass)[bDeviceSubClass](#bdevicesubclass)的值限定。


### bDeviceSubClass


```
uint8_t UsbDeviceDescriptor::bDeviceSubClass
```

**描述:**

由USB标准化组织(USB-IF)分配的子类代码,其值由[bDeviceClass](#bdeviceclass)的值限定。


### bLength


```
uint8_t UsbDeviceDescriptor::bLength
```

**描述:**

该描述符的大小,单位为字节。


### bMaxPacketSize0


```
uint8_t UsbDeviceDescriptor::bMaxPacketSize0
```

**描述:**

端点零的最大包大小,只有8、16、32、64是合法的。


### bNumConfigurations


```
uint8_t UsbDeviceDescriptor::bNumConfigurations
```

**描述:**

配置数量。


### idProduct


```
uint16_t UsbDeviceDescriptor::idProduct
```

**描述:**

由厂商分配的产品编号。


### idVendor


```
uint16_t UsbDeviceDescriptor::idVendor
```

**描述:**

由USB标准化组织(USB-IF)分配的厂商编号。


### iManufacturer


```
uint8_t UsbDeviceDescriptor::iManufacturer
```

**描述:**

描述厂商的字符串描述符的索引。


### iProduct


```
uint8_t UsbDeviceDescriptor::iProduct
```

**描述:**

描述产品的字符串描述符的索引。


### iSerialNumber


```
uint8_t UsbDeviceDescriptor::iSerialNumber
```

**描述:**

描述设备序列号的字符串描述符的索引。