diff --git a/shared/tinyusb/tusb_config.h b/shared/tinyusb/tusb_config.h index 9347042246d8..0cc5ef03985e 100644 --- a/shared/tinyusb/tusb_config.h +++ b/shared/tinyusb/tusb_config.h @@ -77,8 +77,12 @@ // CDC Configuration #if CFG_TUD_CDC -#define CFG_TUD_CDC_RX_BUFSIZE (CFG_TUD_CDC_EP_BUFSIZE) -#define CFG_TUD_CDC_TX_BUFSIZE (CFG_TUD_CDC_EP_BUFSIZE) +#ifndef CFG_TUD_CDC_RX_BUFSIZE +#define CFG_TUD_CDC_RX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256) +#endif +#ifndef CFG_TUD_CDC_TX_BUFSIZE +#define CFG_TUD_CDC_TX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256) +#endif #endif // MSC Configuration