From 264556032f05556834573a74f2bdc0c2d7446204 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Jul 2024 17:15:58 +0700 Subject: [PATCH] fix build with nrf52832 --- src/arduino/ports/nrf/tusb_config_nrf.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/arduino/ports/nrf/tusb_config_nrf.h b/src/arduino/ports/nrf/tusb_config_nrf.h index b30b512d..3b3978c8 100644 --- a/src/arduino/ports/nrf/tusb_config_nrf.h +++ b/src/arduino/ports/nrf/tusb_config_nrf.h @@ -63,6 +63,7 @@ extern "C" { // DEVICE CONFIGURATION //-------------------------------------------------------------------- +#if CFG_TUD_ENABLED #define CFG_TUD_ENDPOINT0_SIZE 64 //------------- CLASS -------------// @@ -114,10 +115,14 @@ extern "C" { #define CFG_TUD_VENDOR_TX_BUFSIZE 64 #endif +#endif + //-------------------------------------------------------------------- // Host Configuration //-------------------------------------------------------------------- +#if CFG_TUH_ENABLED + // Size of buffer to hold descriptors and other data used for enumeration #define CFG_TUH_ENUMERATION_BUFSIZE 256 @@ -158,6 +163,8 @@ extern "C" { #define CFG_TUH_CDC_LINE_CODING_ON_ENUM \ { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 } +#endif + #ifdef __cplusplus } #endif