File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -360,10 +360,19 @@ CFLAGS += \
360
360
-DCFG_TUD_TASK_QUEUE_SZ=32
361
361
endif
362
362
ifeq ($(CIRCUITPY_USB_DEVICE ) ,1)
363
+ ifeq ($(IDF_TARGET ) ,esp32s2)
364
+ # Make more room in internal RAM on the S2.
365
+ CFLAGS += \
366
+ -DCFG_TUD_CDC_RX_BUFSIZE=128 \
367
+ -DCFG_TUD_CDC_TX_BUFSIZE=128 \
368
+ -DCFG_TUD_MSC_BUFSIZE=1024
369
+ else
363
370
CFLAGS += \
364
371
-DCFG_TUD_CDC_RX_BUFSIZE=1024 \
365
372
-DCFG_TUD_CDC_TX_BUFSIZE=1024 \
366
- -DCFG_TUD_MSC_BUFSIZE=4096 \
373
+ -DCFG_TUD_MSC_BUFSIZE=4096
374
+ endif
375
+ CFLAGS += \
367
376
-DCFG_TUD_MIDI_RX_BUFSIZE=128 \
368
377
-DCFG_TUD_MIDI_TX_BUFSIZE=128 \
369
378
-DCFG_TUD_VENDOR_RX_BUFSIZE=128 \
Original file line number Diff line number Diff line change @@ -172,8 +172,10 @@ extern "C" {
172
172
#endif
173
173
174
174
// Size of buffer to hold descriptors and other data used for enumeration
175
+ // CircuitPython itself is 284 bytes of configuration descriptor when both CDC endpoints are
176
+ // enabled, plus 4 bytes for alignment.
175
177
#ifndef CFG_TUH_ENUMERATION_BUFSIZE
176
- #define CFG_TUH_ENUMERATION_BUFSIZE 512
178
+ #define CFG_TUH_ENUMERATION_BUFSIZE (284 + 4)
177
179
#endif
178
180
179
181
#if CIRCUITPY_USB_KEYBOARD_WORKFLOW
You can’t perform that action at this time.
0 commit comments