Skip to content

Commit a0badeb

Browse files
[USB] Set the bcdDevice value to 0
This value should probably be configurable by the sketch, so a meaningful value can be picked. As long is this is not possible, best to use 0, rather than 2.0, otherwise it later becomes impossible to use 2.0 in a meaningful way (you'll never know if the device is really 2.0, or an old version that had no meaningful version number).
1 parent 05c3917 commit a0badeb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cores/arduino/stm32/usb/usbd_desc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
132132
HIBYTE(USBD_VID), /* idVendor */
133133
LOBYTE(USBD_PID), /* idProduct */
134134
HIBYTE(USBD_PID), /* idProduct */
135-
0x00, /* bcdDevice rel. 2.00 */
136-
0x02,
135+
0x00, /* bcdDevice rel. 0.00 */
136+
0x00,
137137
USBD_IDX_MFC_STR, /* Index of manufacturer string */
138138
USBD_IDX_PRODUCT_STR, /* Index of product string */
139139
USBD_IDX_SERIAL_STR, /* Index of serial number string */
@@ -156,8 +156,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
156156
HIBYTE(USBD_VID), /* idVendor */
157157
LOBYTE(USBD_PID), /* idProduct */
158158
HIBYTE(USBD_PID), /* idProduct */
159-
0x00, /* bcdDevice rel. 2.00 */
160-
0x02,
159+
0x00, /* bcdDevice rel. 0.00 */
160+
0x00,
161161
USBD_IDX_MFC_STR, /* Index of manufacturer string */
162162
USBD_IDX_PRODUCT_STR, /* Index of product string */
163163
USBD_IDX_SERIAL_STR, /* Index of serial number string */

0 commit comments

Comments
 (0)