1# UsbDeviceDescriptor
2
3
4## Overview
5
6Defines standard device descriptors, which correspond to **Standard Device Descriptor** in the USB protocol.
7
8**Since**
9
1010
11
12**Related Modules**
13
14[UsbDdk](_usb_ddk.md)
15
16
17## Summary
18
19
20### Member Variables
21
22| Name| Description|
23| -------- | -------- |
24| [bLength](#blength) | Size of the descriptor, in bytes.|
25| [bDescriptorType](#bdescriptortype) | Descriptor type.|
26| [bcdUSB](#bcdusb) | USB protocol release number.|
27| [bDeviceClass](#bdeviceclass) | Interface class code allocated by the USB-IF.|
28| [bDeviceSubClass](#bdevicesubclass) | Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.|
29| [bDeviceProtocol](#bdeviceprotocol) | Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).|
30| [bMaxPacketSize0](#bmaxpacketsize0) | Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.|
31| [idVendor](#idvendor) | Vendor ID allocated by USB-IF.|
32| [idProduct](#idproduct) | Product ID allocated by the vendor.|
33| [bcdDevice](#bcddevice) | Device release number.|
34| [iManufacturer](#imanufacturer) | Index of the string descriptor that describes the vendor.|
35| [iProduct](#iproduct) | Index of the string descriptor that describes the product.|
36| [iSerialNumber](#iserialnumber) | Index of the string descriptor that describes the device SN.|
37| [bNumConfigurations](#bnumconfigurations) | Configuration quantity.|
38
39
40## Member Variable Description
41
42
43### bcdDevice
44
45
46```
47uint16_t UsbDeviceDescriptor::bcdDevice
48```
49
50**Description**
51
52Device release number.
53
54
55### bcdUSB
56
57
58```
59uint16_t UsbDeviceDescriptor::bcdUSB
60```
61
62**Description**
63
64USB protocol release number.
65
66
67### bDescriptorType
68
69
70```
71uint8_t UsbDeviceDescriptor::bDescriptorType
72```
73
74**Description**
75
76Descriptor type.
77
78
79### bDeviceClass
80
81
82```
83uint8_t UsbDeviceDescriptor::bDeviceClass
84```
85
86**Description**
87
88Interface class code allocated by the USB-IF.
89
90
91### bDeviceProtocol
92
93
94```
95uint8_t UsbDeviceDescriptor::bDeviceProtocol
96```
97
98**Description**
99
100Protocol code allocated by USB-IF. The value is limited by that of [bDeviceClass](#bdeviceclass) and [bDeviceSubClass](#bdevicesubclass).
101
102
103### bDeviceSubClass
104
105
106```
107uint8_t UsbDeviceDescriptor::bDeviceSubClass
108```
109
110**Description**
111
112Device subclass code allocated by USB-IF. The value is limited by that of bDeviceClass.
113
114
115### bLength
116
117
118```
119uint8_t UsbDeviceDescriptor::bLength
120```
121
122**Description**
123
124Size of the descriptor, in bytes.
125
126
127### bMaxPacketSize0
128
129
130```
131uint8_t UsbDeviceDescriptor::bMaxPacketSize0
132```
133
134**Description**
135
136Maximum packet size of endpoint 0. Only values 8, 16, 32, and 64 are valid.
137
138
139### bNumConfigurations
140
141
142```
143uint8_t UsbDeviceDescriptor::bNumConfigurations
144```
145
146**Description**
147
148Configuration quantity.
149
150
151### idProduct
152
153
154```
155uint16_t UsbDeviceDescriptor::idProduct
156```
157
158**Description**
159
160Product ID allocated by the vendor.
161
162
163### idVendor
164
165
166```
167uint16_t UsbDeviceDescriptor::idVendor
168```
169
170**Description**
171
172Vendor ID allocated by USB-IF.
173
174
175### iManufacturer
176
177
178```
179uint8_t UsbDeviceDescriptor::iManufacturer
180```
181
182**Description**
183
184Index of the string descriptor that describes the vendor.
185
186
187### iProduct
188
189
190```
191uint8_t UsbDeviceDescriptor::iProduct
192```
193
194**Description**
195
196Index of the string descriptor that describes the product.
197
198
199### iSerialNumber
200
201
202```
203uint8_t UsbDeviceDescriptor::iSerialNumber
204```
205
206**Description**
207
208Index of the string descriptor that describes the device SN.
209