Skip to content

Commit 7db8b4f

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 d07a7b5 commit 7db8b4f

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
@@ -116,8 +116,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
116116
HIBYTE(USBD_VID), /* idVendor */
117117
LOBYTE(USBD_PID), /* idProduct */
118118
HIBYTE(USBD_PID), /* idProduct */
119-
0x00, /* bcdDevice rel. 2.00 */
120-
0x02,
119+
0x00, /* bcdDevice rel. 0.00 */
120+
0x00,
121121
USBD_IDX_MFC_STR, /* Index of manufacturer string */
122122
USBD_IDX_PRODUCT_STR, /* Index of product string */
123123
USBD_IDX_SERIAL_STR, /* Index of serial number string */
@@ -140,8 +140,8 @@ __ALIGN_BEGIN uint8_t USBD_Class_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
140140
HIBYTE(USBD_VID), /* idVendor */
141141
LOBYTE(USBD_PID), /* idProduct */
142142
HIBYTE(USBD_PID), /* idProduct */
143-
0x00, /* bcdDevice rel. 2.00 */
144-
0x02,
143+
0x00, /* bcdDevice rel. 0.00 */
144+
0x00,
145145
USBD_IDX_MFC_STR, /* Index of manufacturer string */
146146
USBD_IDX_PRODUCT_STR, /* Index of product string */
147147
USBD_IDX_SERIAL_STR, /* Index of serial number string */

0 commit comments

Comments
 (0)