diff options
| author | HiFiPhile <[email protected]> | 2024-04-12 01:15:46 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-26 00:17:50 +0200 |
| commit | 67f32da1b9a460262e028784ffb0386edd507612 (patch) | |
| tree | a464e630789afcac8697757c001dec071528d004 /src/class/cdc/cdc_device.h | |
| parent | 8b4ca69e56860e12596e2bef63fc155f8dce338c (diff) | |
cdc: add uart status notification support.
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 20e908451..92131f159 100644 --- a/src/class/cdc/cdc_device.h +++ b/src/class/cdc/cdc_device.h @@ -64,6 +64,9 @@ uint8_t tud_cdc_n_get_line_state (uint8_t itf); // Get current line encoding: bit rate, stop bits parity etc .. void tud_cdc_n_get_line_coding (uint8_t itf, cdc_line_coding_t* coding); +// Send UART status notification: DCD, DSR etc .. +bool tud_cdc_n_send_uart_state (uint8_t itf, cdc_uart_state_t state); + // Set special character that will trigger tud_cdc_rx_wanted_cb() callback on receiving void tud_cdc_n_set_wanted_char (uint8_t itf, char wanted); @@ -109,6 +112,7 @@ bool tud_cdc_n_write_clear (uint8_t itf); static inline bool tud_cdc_connected (void); static inline uint8_t tud_cdc_get_line_state (void); static inline void tud_cdc_get_line_coding (cdc_line_coding_t* coding); +static inline bool tud_cdc_send_uart_state (cdc_uart_state_t state); static inline void tud_cdc_set_wanted_char (char wanted); static inline uint32_t tud_cdc_available (void); @@ -180,6 +184,11 @@ static inline void tud_cdc_get_line_coding (cdc_line_coding_t* coding) tud_cdc_n_get_line_coding(0, coding); } +static inline bool tud_cdc_send_uart_state (cdc_uart_state_t state) +{ + return tud_cdc_n_send_uart_state(0, state); +} + static inline void tud_cdc_set_wanted_char (char wanted) { tud_cdc_n_set_wanted_char(0, wanted); |
