summaryrefslogtreecommitdiff
path: root/examples/device/cdc_msc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-03-12 14:57:29 +0700
committerGitHub <[email protected]>2026-03-12 14:57:29 +0700
commitac61a5b176b44db503d8bcc287a622463b65e48e (patch)
treeffae5c864f88a540b1689763dbd7494b4ad29c8e /examples/device/cdc_msc
parentf2450788b13f8424b2f75e33240ed21329a875ad (diff)
parent9e5345e70228153ab4efff6f6666c4e54471a4aa (diff)
Merge pull request #3487 from hathach/zlp-hs-on-fs
fix transfer length when high speed capable device/host working at full speed
Diffstat (limited to 'examples/device/cdc_msc')
-rw-r--r--examples/device/cdc_msc/src/tusb_config.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/device/cdc_msc/src/tusb_config.h b/examples/device/cdc_msc/src/tusb_config.h
index 3f2f05f20..f0709d8fb 100644
--- a/examples/device/cdc_msc/src/tusb_config.h
+++ b/examples/device/cdc_msc/src/tusb_config.h
@@ -103,10 +103,10 @@
#define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
-// CDC Endpoint transfer buffer size, more is faster
-// Leave it as default size (512 for HS, 64 for FS) unless your host application
-// is able to send ZLP (Zero Length Packet) to terminate transfer !
-#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
+// CDC Endpoint transfer buffer size, default to max bulk packet size (HS 512, FS 64). Larger is faster.
+// Larger RX_EPSIZE requires CFG_TUD_CDC_RX_NEED_ZLP = 1 and host ZLP support
+#define CFG_TUD_CDC_RX_EPSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
+#define CFG_TUD_CDC_TX_EPSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
// MSC Buffer size of Device Mass storage
#define CFG_TUD_MSC_EP_BUFSIZE 512