From 6de3ce40cf7538fa0838e957d9b89166e3473229 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 30 Aug 2018 16:13:20 +0700 Subject: [PATCH] increase cdc buffer to 256, fix build error with nrf52832 --- cores/nRF5/usb/tusb_config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cores/nRF5/usb/tusb_config.h b/cores/nRF5/usb/tusb_config.h index d6630d2b..d3db3a15 100644 --- a/cores/nRF5/usb/tusb_config.h +++ b/cores/nRF5/usb/tusb_config.h @@ -47,7 +47,12 @@ // COMMON CONFIGURATION //-------------------------------------------------------------------- #define CFG_TUSB_MCU OPT_MCU_NRF5X + +#ifdef NRF52840_XXAA #define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE +#else +#define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE +#endif #define CFG_TUSB_DEBUG 0 @@ -101,8 +106,8 @@ //-------------------------------------------------------------------- // FIFO size of CDC TX and RX -#define CFG_TUD_CDC_RX_BUFSIZE 64 -#define CFG_TUD_CDC_TX_BUFSIZE 64 +#define CFG_TUD_CDC_RX_BUFSIZE 256 +#define CFG_TUD_CDC_TX_BUFSIZE 256 // TX is sent automatically every Start of Frame event. // If not enabled, application must call tud_cdc_write_flush() periodically