diff options
| author | Ha Thach <[email protected]> | 2020-11-24 01:04:44 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-24 01:04:44 +0700 |
| commit | 2bfcd446a58d987d2275774c985471198cf43328 (patch) | |
| tree | cb6eee5f2dbb43258951f8aee102b93783c91e1b /src/class/cdc/cdc_device.h | |
| parent | b870d932e5e1c6ece4227a5d49cc71e53a744149 (diff) | |
| parent | 494e125432ca3eb6faa5de2896cfb8e2e7143ddb (diff) | |
Merge pull request #506 from duempel/cdc_without_dtr
CDC without DTR being set
Diffstat (limited to 'src/class/cdc/cdc_device.h')
| -rw-r--r-- | src/class/cdc/cdc_device.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h index 3e68e2a88..62dcd3c0a 100644 --- a/src/class/cdc/cdc_device.h +++ b/src/class/cdc/cdc_device.h @@ -102,6 +102,9 @@ uint32_t tud_cdc_n_write_flush (uint8_t itf); // Return the number of bytes (characters) available for writing to TX FIFO buffer in a single n_write operation. uint32_t tud_cdc_n_write_available (uint8_t itf); +// Clear the transmit FIFO +bool tud_cdc_n_write_clear (uint8_t itf); + //--------------------------------------------------------------------+ // Application API (Single Port) //--------------------------------------------------------------------+ @@ -121,6 +124,7 @@ static inline uint32_t tud_cdc_write (void const* buffer, uint32_t buf static inline uint32_t tud_cdc_write_str (char const* str); static inline uint32_t tud_cdc_write_flush (void); static inline uint32_t tud_cdc_write_available (void); +static inline bool tud_cdc_write_clear (void); //--------------------------------------------------------------------+ // Application Callback API (weak is optional) @@ -230,6 +234,11 @@ static inline uint32_t tud_cdc_write_available(void) return tud_cdc_n_write_available(0); } +static inline bool tud_cdc_write_clear(void) +{ + return tud_cdc_n_write_clear(0); +} + /** @} */ /** @} */ |
