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 += \
360360 -DCFG_TUD_TASK_QUEUE_SZ=32
361361endif
362362ifeq ($(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
363370CFLAGS += \
364371 -DCFG_TUD_CDC_RX_BUFSIZE=1024 \
365372 -DCFG_TUD_CDC_TX_BUFSIZE=1024 \
366- -DCFG_TUD_MSC_BUFSIZE=4096 \
373+ -DCFG_TUD_MSC_BUFSIZE=4096
374+ endif
375+ CFLAGS += \
367376 -DCFG_TUD_MIDI_RX_BUFSIZE=128 \
368377 -DCFG_TUD_MIDI_TX_BUFSIZE=128 \
369378 -DCFG_TUD_VENDOR_RX_BUFSIZE=128 \
Original file line number Diff line number Diff line change @@ -172,8 +172,10 @@ extern "C" {
172172#endif
173173
174174// 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.
175177#ifndef CFG_TUH_ENUMERATION_BUFSIZE
176- #define CFG_TUH_ENUMERATION_BUFSIZE 512
178+ #define CFG_TUH_ENUMERATION_BUFSIZE (284 + 4)
177179#endif
178180
179181#if CIRCUITPY_USB_KEYBOARD_WORKFLOW
You can’t perform that action at this time.
0 commit comments