8000 Reduce USB static buffers for ESP32-S2 by tannewt · Pull Request #10293 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Reduce USB static buffers for ESP32-S2 #10293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy stateme 8000 nt. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion ports/espressif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,19 @@ CFLAGS += \
-DCFG_TUD_TASK_QUEUE_SZ=32
endif
ifeq ($(CIRCUITPY_USB_DEVICE),1)
ifeq ($(IDF_TARGET),esp32s2)
# Make more room in internal RAM on the S2.
CFLAGS += \
-DCFG_TUD_CDC_RX_BUFSIZE=128 \
-DCFG_TUD_CDC_TX_BUFSIZE=128 \
-DCFG_TUD_MSC_BUFSIZE=1024
else
CFLAGS += \
-DCFG_TUD_CDC_RX_BUFSIZE=1024 \
-DCFG_TUD_CDC_TX_BUFSIZE=1024 \
-DCFG_TUD_MSC_BUFSIZE=4096 \
-DCFG_TUD_MSC_BUFSIZE=4096
endif
CFLAGS += \
-DCFG_TUD_MIDI_RX_BUFSIZE=128 \
-DCFG_TUD_MIDI_TX_BUFSIZE=128 \
-DCFG_TUD_VENDOR_RX_BUFSIZE=128 \
Expand Down
4 changes: 3 additions & 1 deletion supervisor/shared/usb/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ extern "C" {
#endif

// Size of buffer to hold descriptors and other data used for enumeration
// CircuitPython itself is 284 bytes of configuration descriptor when both CDC endpoints are
// enabled, plus 4 bytes for alignment.
#ifndef CFG_TUH_ENUMERATION_BUFSIZE
#define CFG_TUH_ENUMERATION_BUFSIZE 512
#define CFG_TUH_ENUMERATION_BUFSIZE (284 + 4)
#endif

#if CIRCUITPY_USB_KEYBOARD_WORKFLOW
Expand Down
0