diff options
| author | hathach <[email protected]> | 2026-03-12 12:16:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-03-12 12:25:59 +0700 |
| commit | aea4f6046e9a07d5f169de9fcc31bca2b667ea45 (patch) | |
| tree | c40350fb2cd9d4ccaea8b82952aaee818a482b2e /src/class/cdc/cdc_device.h | |
| parent | 78bbc7dc2e80daba79351bc37e11b13243fd6f8c (diff) | |
refactor(vendor/cdc): add CFG_TUD_CDC_RX_NEED_ZLP and CFG_TUD_VENDOR_RX_NEED_ZLP
Diffstat (limited to 'src/class/cdc/cdc_device.h')
| -rw-r--r-- | src/class/cdc/cdc_device.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h index 3baf84d00..0348bd2ec 100644 --- a/src/class/cdc/cdc_device.h +++ b/src/class/cdc/cdc_device.h @@ -65,13 +65,17 @@ #endif #endif +// Enable multi-packet RX transfer with ZLP termination for better throughput. Requires host support for ZLP. +#ifndef CFG_TUD_CDC_RX_NEED_ZLP + #define CFG_TUD_CDC_RX_NEED_ZLP 0 +#endif + #ifndef CFG_TUD_CDC_CONFIGURE_DEFAULT #define CFG_TUD_CDC_CONFIGURE_DEFAULT() \ { \ .rx_persistent = false, \ .tx_persistent = false, \ .tx_overwritabe_if_not_connected = true, \ - .rx_need_zlp = false \ } #endif @@ -82,7 +86,6 @@ typedef struct { bool rx_persistent; // keep rx fifo data even with bus reset or disconnect bool tx_persistent; // keep tx fifo data even with reset or disconnect bool tx_overwritabe_if_not_connected; // if not connected, tx fifo can be overwritten - bool rx_need_zlp; // requires host support ZLP, allow transfer more than one packet in a single transfer, better throughput. } tud_cdc_configure_t; // Configure CDC driver behavior |
