rp2040: leverage existing macro for capping endpoints in pico-sdk
This commit is contained in:
parent
592d047936
commit
5a8ae31316
|
@ -48,8 +48,8 @@
|
||||||
// Init these in dcd_init
|
// Init these in dcd_init
|
||||||
static uint8_t *next_buffer_ptr;
|
static uint8_t *next_buffer_ptr;
|
||||||
|
|
||||||
// Endpoints 0-TUD_OPT_RP2040_USB_MAX_ENDPOINTS, direction 0 for out and 1 for in.
|
// USB_MAX_ENDPOINTS Endpoints, direction 0 for out and 1 for in.
|
||||||
static struct hw_endpoint hw_endpoints[TUD_OPT_RP2040_USB_MAX_ENDPOINTS][2] = {0};
|
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)
|
static inline struct hw_endpoint *hw_endpoint_get_by_num(uint8_t num, uint8_t in)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
#define TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX PICO_RP2040_USB_DEVICE_ENUMERATION_FIX
|
#define TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX PICO_RP2040_USB_DEVICE_ENUMERATION_FIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(TUD_OPT_RP2040_USB_MAX_ENDPOINTS)
|
|
||||||
#define TUD_OPT_RP2040_USB_MAX_ENDPOINTS 16
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// For memset
|
// For memset
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue