summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_device.h
diff options
context:
space:
mode:
authorAndrew Leech <[email protected]>2024-05-07 20:17:48 +1000
committerAndrew Leech <[email protected]>2024-05-08 19:41:02 +1000
commitd01b2cfc0e25e6d64f8d7a2d764c2620e0d9d71f (patch)
treecc54334e5dded188fd319f8f47813e775027fa73 /src/class/cdc/cdc_device.h
parente5b6f93df35d7ac413ca405e67a6c9d8c79b680d (diff)
Add option to make CDC TX buffer persistent.
Diffstat (limited to 'src/class/cdc/cdc_device.h')
-rw-r--r--src/class/cdc/cdc_device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h
index 20e908451..db709b3bc 100644
--- a/src/class/cdc/cdc_device.h
+++ b/src/class/cdc/cdc_device.h
@@ -41,6 +41,12 @@
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#endif
+// By default the TX fifo buffer is cleared on connect / bus reset.
+// Enable this to persist any data in the fifo instead.
+#ifndef CFG_TUD_CDC_PERSISTENT_TX_BUFF
+ #define CFG_TUD_CDC_PERSISTENT_TX_BUFF (0)
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif