diff options
| author | Damien George <damien@micropython.org> | 2023-09-20 19:14:22 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-12-20 19:31:15 +1100 |
| commit | 49d0c22b11732da3be622d7c550ecb4249bf17ac (patch) | |
| tree | 26436f4c19855be9385af72f68ef38697e247c04 | |
| parent | 859f219690db5a1b91865e0a70c2b71d19be42a6 (diff) | |
stm32/mboot: Expand device descriptor to make it easier to understand.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/mboot/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c index 40bcd23ed..ed5ed1e3f 100644 --- a/ports/stm32/mboot/main.c +++ b/ports/stm32/mboot/main.c @@ -1024,10 +1024,20 @@ __ALIGN_BEGIN static const uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __AL }; static const uint8_t dev_descr[0x12] = { - 0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, + 0x12, // bLength + 0x01, // bDescriptorType: Device + 0x00, 0x01, // USB version: 1.00 + 0x00, // bDeviceClass + 0x00, // bDeviceSubClass + 0x00, // bDeviceProtocol + 0x40, // bMaxPacketSize LOBYTE(MBOOT_USB_VID), HIBYTE(MBOOT_USB_VID), LOBYTE(MBOOT_USB_PID), HIBYTE(MBOOT_USB_PID), - 0x00, 0x22, 0x01, 0x02, 0x03, 0x01 + 0x00, 0x22, // bcdDevice: 22.00 + 0x01, // iManufacturer + 0x02, // iProduct + 0x03, // iSerialNumber + 0x01, // bNumConfigurations: 1 }; // This may be modified by USBD_GetDescriptor |
