summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Lawrence <[email protected]>2021-02-23 10:08:38 -0600
committerPeter Lawrence <[email protected]>2021-02-23 10:08:38 -0600
commit5a8ae31316ed30937e910e376dc6f62e8e4e3433 (patch)
tree6b7377d2d99ec8b59b1dfcf676b80c81807e0b34
parent592d047936544af03e7704ad7a88acef88fd6aee (diff)
rp2040: leverage existing macro for capping endpoints in pico-sdk
-rw-r--r--src/portable/raspberrypi/rp2040/dcd_rp2040.c4
-rw-r--r--src/portable/raspberrypi/rp2040/rp2040_usb.h4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
index d329d40c3..9c43b6fdb 100644
--- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c
+++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
@@ -48,8 +48,8 @@
// Init these in dcd_init
static uint8_t *next_buffer_ptr;
-// Endpoints 0-TUD_OPT_RP2040_USB_MAX_ENDPOINTS, direction 0 for out and 1 for in.
-static struct hw_endpoint hw_endpoints[TUD_OPT_RP2040_USB_MAX_ENDPOINTS][2] = {0};
+// USB_MAX_ENDPOINTS Endpoints, direction 0 for out and 1 for in.
+static struct hw_endpoint hw_endpoints[USB_MAX_ENDPOINTS][2] = {0};
static inline struct hw_endpoint *hw_endpoint_get_by_num(uint8_t num, uint8_t in)
{
diff --git a/src/portable/raspberrypi/rp2040/rp2040_usb.h b/src/portable/raspberrypi/rp2040/rp2040_usb.h
index be9b507c2..522d7d701 100644
--- a/src/portable/raspberrypi/rp2040/rp2040_usb.h
+++ b/src/portable/raspberrypi/rp2040/rp2040_usb.h
@@ -16,10 +16,6 @@
#define TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX PICO_RP2040_USB_DEVICE_ENUMERATION_FIX
#endif
-#if !defined(TUD_OPT_RP2040_USB_MAX_ENDPOINTS)
-#define TUD_OPT_RP2040_USB_MAX_ENDPOINTS 16
-#endif
-
// For memset
#include <string.h>