Skip to content

Commit 0e24dcb

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 4c0b81f commit 0e24dcb

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
@@ -135,8 +135,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
135135
HIBYTE(USBD_VID), /* idVendor */
136136
LOBYTE(USBD_PID), /* idProduct */
137137
HIBYTE(USBD_PID), /* idProduct */
138-
0x00, /* bcdDevice rel. 2.00 */
139-
0x02,
138+
0x00, /* bcdDevice rel. 0.00 */
139+
0x00,
140140
USBD_IDX_MFC_STR, /* Index of manufacturer string */
141141
USBD_IDX_PRODUCT_STR, /* Index of product string */
142142
USBD_IDX_SERIAL_STR, /* Index of serial number string */
@@ -159,8 +159,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
159159
HIBYTE(USBD_VID), /* idVendor */
160160
LOBYTE(USBD_PID), /* idProduct */
161161
HIBYTE(USBD_PID), /* idProduct */
162-
0x00, /* bcdDevice rel. 2.00 */
163-
0x02,
162+
0x00, /* bcdDevice rel. 0.00 */
163+
0x00,
164164
USBD_IDX_MFC_STR, /* Index of manufacturer string */
165165
USBD_IDX_PRODUCT_STR, /* Index of product string */
166166
USBD_IDX_SERIAL_STR, /* Index of serial number string */

0 commit comments

Comments
 (0)