rp2040: leverage existing macro for capping endpoints in pico-sdk

This commit is contained in:
Peter Lawrence 2021-02-23 10:08:38 -06:00
parent 592d047936
commit 5a8ae31316
2 changed files with 2 additions and 6 deletions

View File

@ -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)
{

View File

@ -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>