diff options
author | Damien George <damien@micropython.org> | 2021-02-17 12:04:38 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-17 14:40:43 +1100 |
commit | caeec80a9c34f950da41ffe4d5e6f3b4adc680fd (patch) | |
tree | 1a6e47ea60180655c4bfa33a82ace30797072f30 | |
parent | 2c1299b0071c2c528cc01e3cde9eb22743820176 (diff) |
stm32/usb: Allow a board to configure USBD_VID and all PIDs.
If a board defines USBD_VID then that will be used instead of the default.
And then the board must also define all USBD_PID_xxx values that it needs.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | ports/stm32/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/usb.h b/ports/stm32/usb.h index f69af86e5..295038ebd 100644 --- a/ports/stm32/usb.h +++ b/ports/stm32/usb.h @@ -30,6 +30,7 @@ #define PYB_USB_FLAG_USB_MODE_CALLED (0x0002) +#ifndef USBD_VID // Windows needs a different PID to distinguish different device configurations #define USBD_VID (0xf055) #define USBD_PID_CDC_MSC (0x9800) @@ -43,6 +44,7 @@ #define USBD_PID_CDC_MSC_HID (0x9808) #define USBD_PID_CDC2_MSC_HID (0x9809) #define USBD_PID_CDC3_MSC_HID (0x980a) +#endif typedef enum { PYB_USB_STORAGE_MEDIUM_NONE = 0, |