mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 11:02:16 +00:00
avoid flushing tx buffer on connection
Signed-off-by: Zixun LI <admin@hifiphile.com>
This commit is contained in:
@ -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_t *stream_tx = &p_cdc->tx_stream;
|
||||||
tu_edpt_stream_open(stream_tx, rhport, desc_ep, CFG_TUD_CDC_TX_EPSIZE);
|
tu_edpt_stream_open(stream_tx, rhport, desc_ep, CFG_TUD_CDC_TX_EPSIZE);
|
||||||
|
|
||||||
#if CFG_TUD_CDC_TX_PERSISTENT
|
#if !CFG_TUD_CDC_TX_PERSISTENT
|
||||||
tu_edpt_stream_write_xfer(stream_tx); // flush pending data
|
|
||||||
#else
|
|
||||||
tu_edpt_stream_clear(stream_tx);
|
tu_edpt_stream_clear(stream_tx);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user