Skip to content

Commit 64e01cb

Browse files
Save 448 bytes of RAM with smaller buffer
Reduce the disk buffer size to 64 bytes. The buffer is statically allocated so it's always present, even in non-USB disk mode, meaning all apps will pay the RAM price for it. 64 bytes is slower to read but works and saves ~1/2KB of heap for all apps.
1 parent d92ba4a commit 64e01cb

File tree

4 files changed

+1
-3
lines changed

4 files changed

+1
-3
lines changed

include/tusb_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181

8282
#define CFG_TUD_MSC_EP_BUFSIZE (512)
8383

84-
8584
// HID buffer size Should be sufficient to hold ID (if any) + Data
8685
#define CFG_TUD_HID_EP_BUFSIZE (64)
8786

lib/libpico-ipv6.a

0 Bytes
Binary file not shown.

lib/libpico.a

0 Bytes
Binary file not shown.

tools/libpico/tusb_config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@
7979
#define CFG_TUD_CDC_RX_BUFSIZE (256)
8080
#define CFG_TUD_CDC_TX_BUFSIZE (256)
8181

82-
#define CFG_TUD_MSC_EP_BUFSIZE (512)
83-
82+
#define CFG_TUD_MSC_EP_BUFSIZE (64)
8483

8584
// HID buffer size Should be sufficient to hold ID (if any) + Data
8685
#define CFG_TUD_HID_EP_BUFSIZE (64)

0 commit comments

Comments
 (0)