diff options
| author | Andrew Leech <[email protected]> | 2024-05-07 20:17:48 +1000 |
|---|---|---|
| committer | Andrew Leech <[email protected]> | 2024-05-08 19:41:02 +1000 |
| commit | d01b2cfc0e25e6d64f8d7a2d764c2620e0d9d71f (patch) | |
| tree | cc54334e5dded188fd319f8f47813e775027fa73 /src/class/cdc/cdc_device.c | |
| parent | e5b6f93df35d7ac413ca405e67a6c9d8c79b680d (diff) | |
Add option to make CDC TX buffer persistent.
Diffstat (limited to 'src/class/cdc/cdc_device.c')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 2e0a0c30d..f36725eba 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -295,7 +295,9 @@ void cdcd_reset(uint8_t rhport) tu_memclr(p_cdc, ITF_MEM_RESET_SIZE); tu_fifo_clear(&p_cdc->rx_ff); + #if !CFG_TUD_CDC_PERSISTENT_TX_BUFF tu_fifo_clear(&p_cdc->tx_ff); + #endif tu_fifo_set_overwritable(&p_cdc->tx_ff, true); } } |
