10000 Merge remote-tracking branch 'origin/main' · weblate/circuitpython@d7655c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7655c1

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents e7e6399 + 36bc41c commit d7655c1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ports/espressif/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,19 @@ CFLAGS += \
360360
-DCFG_TUD_TASK_QUEUE_SZ=32
361361
endif
362362
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
363370
CFLAGS += \
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 \

supervisor/shared/usb/tusb_config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
0