Skip to content

Commit 49d0c22

Browse files
committed
stm32/mboot: Expand device descriptor to make it easier to understand.
Signed-off-by: Damien George <[email protected]>
1 parent 859f219 commit 49d0c22

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ports/stm32/mboot/main.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,10 +1024,20 @@ __ALIGN_BEGIN static const uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __AL
10241024
};
10251025

10261026
static const uint8_t dev_descr[0x12] = {
1027-
0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40,
1027+
0x12, // bLength
1028+
0x01, // bDescriptorType: Device
1029+
0x00, 0x01, // USB version: 1.00
1030+
0x00, // bDeviceClass
1031+
0x00, // bDeviceSubClass
1032+
0x00, // bDeviceProtocol
1033+
0x40, // bMaxPacketSize
10281034
LOBYTE(MBOOT_USB_VID), HIBYTE(MBOOT_USB_VID),
10291035
LOBYTE(MBOOT_USB_PID), HIBYTE(MBOOT_USB_PID),
1030-
0x00, 0x22, 0x01, 0x02, 0x03, 0x01
1036+
0x00, 0x22, // bcdDevice: 22.00
1037+
0x01, // iManufacturer
1038+
0x02, // iProduct
1039+
0x03, // iSerialNumber
1040+
0x01, // bNumConfigurations: 1
10311041
};
10321042

10331043
// This may be modified by USBD_GetDescriptor

0 commit comments

Comments
 (0)