summaryrefslogtreecommitdiff
path: root/tinyusb/class/cdc/cdc_device.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-20 18:33:06 +0700
committerhathach <[email protected]>2018-03-20 18:33:28 +0700
commit2f0fcf80e0b2d49116a019c02da5bc63dadc763b (patch)
tree770f629b6876ad3a4ad29b282d98229280f1ce93 /tinyusb/class/cdc/cdc_device.h
parent7a628f4dfca4a6cf3b086439bca6ca0361b92b39 (diff)
nrf52 cdc example work on nrf52840pdk
- add tud_cdc_flush(), auto flush with sof is enabled by default. -
Diffstat (limited to 'tinyusb/class/cdc/cdc_device.h')
-rw-r--r--tinyusb/class/cdc/cdc_device.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/tinyusb/class/cdc/cdc_device.h b/tinyusb/class/cdc/cdc_device.h
index 4ae9be7c1..44768d1a2 100644
--- a/tinyusb/class/cdc/cdc_device.h
+++ b/tinyusb/class/cdc/cdc_device.h
@@ -63,18 +63,20 @@ uint32_t tud_n_cdc_read (uint8_t port, void* buffer, uint32_t bufsize);
uint32_t tud_n_cdc_write_char (uint8_t port, char ch);
uint32_t tud_n_cdc_write (uint8_t port, void const* buffer, uint32_t bufsize);
+bool tud_n_cdc_flush (uint8_t port);
//--------------------------------------------------------------------+
// APPLICATION API (Single Port)
//--------------------------------------------------------------------+
-static inline bool tud_cdc_connected (void) { return tud_n_cdc_connected(0); }
-static inline uint32_t tud_cdc_available (void) { return tud_n_cdc_available(0); }
+static inline bool tud_cdc_connected (void) { return tud_n_cdc_connected(0); }
+static inline uint32_t tud_cdc_available (void) { return tud_n_cdc_available(0); }
-static inline int tud_cdc_read_char (void) { return tud_n_cdc_read_char(0); }
-static inline uint32_t tud_cdc_read (void* buffer, uint32_t bufsize) { return tud_n_cdc_read(0, buffer, bufsize); }
+static inline int tud_cdc_read_char (void) { return tud_n_cdc_read_char(0); }
+static inline uint32_t tud_cdc_read (void* buffer, uint32_t bufsize) { return tud_n_cdc_read(0, buffer, bufsize); }
-static inline uint32_t tud_cdc_write_char (char ch) { return tud_n_cdc_write_char(0, ch); }
+static inline uint32_t tud_cdc_write_char (char ch) { return tud_n_cdc_write_char(0, ch); }
static inline uint32_t tud_cdc_write (void const* buffer, uint32_t bufsize) { return tud_n_cdc_write(0, buffer, bufsize); }
+static inline bool tud_cdc_flush (void) { return tud_n_cdc_flush(0); }
//--------------------------------------------------------------------+
// APPLICATION CALLBACK API