summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_device.c
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-08-04 16:02:10 +0200
committerZixun LI <[email protected]>2026-08-04 16:02:10 +0200
commit029691afa4dad1309691369de709b2f1226717d9 (patch)
tree1f6f4c00f18750647f009dc47c56479c69cfd176 /src/class/cdc/cdc_device.c
parent2d56dc533e45e4e91b15e93fdab5e22e964f328d (diff)
avoid flushing tx buffer on connectioncdc_persistent
Signed-off-by: Zixun LI <[email protected]>
Diffstat (limited to 'src/class/cdc/cdc_device.c')
-rw-r--r--src/class/cdc/cdc_device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index 56d4aeed9..ed050ad03 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -323,9 +323,7 @@ uint16_t cdcd_open(uint8_t rhport, const tusb_desc_interface_t* itf_desc, uint16
tu_edpt_stream_t *stream_tx = &p_cdc->tx_stream;
tu_edpt_stream_open(stream_tx, rhport, desc_ep, CFG_TUD_CDC_TX_EPSIZE);
- #if CFG_TUD_CDC_TX_PERSISTENT
- tu_edpt_stream_write_xfer(stream_tx); // flush pending data
- #else
+ #if !CFG_TUD_CDC_TX_PERSISTENT
tu_edpt_stream_clear(stream_tx);
#endif
} else {