summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/rp2/tusb_port.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ports/rp2/tusb_port.c b/ports/rp2/tusb_port.c
index 874d837b9..8896be907 100644
--- a/ports/rp2/tusb_port.c
+++ b/ports/rp2/tusb_port.c
@@ -27,8 +27,12 @@
#include "tusb.h"
#include "pico/unique_id.h"
-#define USBD_VID (0x2E8A) // Raspberry Pi
-#define USBD_PID (0x0005) // RP2 MicroPython
+#ifndef MICROPY_HW_USB_VID
+#define MICROPY_HW_USB_VID (0x2E8A) // Raspberry Pi
+#endif
+#ifndef MICROPY_HW_USB_PID
+#define MICROPY_HW_USB_PID (0x0005) // RP2 MicroPython
+#endif
#define USBD_DESC_LEN (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN)
#define USBD_MAX_POWER_MA (250)
@@ -58,8 +62,8 @@ static const tusb_desc_device_t usbd_desc_device = {
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
.bDeviceProtocol = MISC_PROTOCOL_IAD,
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
- .idVendor = USBD_VID,
- .idProduct = USBD_PID,
+ .idVendor = MICROPY_HW_USB_VID,
+ .idProduct = MICROPY_HW_USB_PID,
.bcdDevice = 0x0100,
.iManufacturer = USBD_STR_MANUF,
.iProduct = USBD_STR_PRODUCT,