Skip to content

Commit d88630b

Browse files
authored
Update tusb_config.h
1 parent 1557fc4 commit d88630b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/arduino_tinyusb/include/tusb_config.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ extern "C" {
7272
# define CONFIG_TINYUSB_VENDOR_ENABLED 0
7373
#endif
7474

75+
#ifndef CONFIG_TINYUSB_NCM_ENABLED
76+
# define CONFIG_TINYUSB_NCM_ENABLED 0
77+
#endif
78+
7579
/* */
7680
/* COMMON CONFIGURATION */
7781
/* */
@@ -96,11 +100,18 @@ extern "C" {
96100
# define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
97101
#endif
98102

103+
#if CONFIG_IDF_TARGET_ESP32P4
104+
#define CFG_TUD_MAX_SPEED OPT_MODE_HIGH_SPEED
105+
#else
106+
#define CFG_TUD_MAX_SPEED OPT_MODE_FULL_SPEED
107+
#endif
108+
99109
/* */
100110
/* DRIVER CONFIGURATION */
101111
/* */
102112

103113
#define CFG_TUD_MAINTASK_SIZE 4096
114+
#define CFG_TUD_ENDOINT_SIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
104115
#define CFG_TUD_ENDOINT0_SIZE 64
105116

106117
// Enabled Drivers
@@ -113,6 +124,7 @@ extern "C" {
113124
#define CFG_TUD_DFU_RUNTIME CONFIG_TINYUSB_DFU_RT_ENABLED
114125
#define CFG_TUD_DFU CONFIG_TINYUSB_DFU_ENABLED
115126
#define CFG_TUD_VENDOR CONFIG_TINYUSB_VENDOR_ENABLED
127+
#define CFG_TUD_NCM CONFIG_TINYUSB_NCM_ENABLED
116128

117129
// CDC FIFO size of TX and RX
118130
#define CFG_TUD_CDC_RX_BUFSIZE CONFIG_TINYUSB_CDC_RX_BUFSIZE

0 commit comments

Comments
 (0)