diff options
| author | Dan Halbert <halbert@halwitz.org> | 2021-02-08 10:57:41 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2021-02-08 10:57:41 -0500 |
| commit | 1b7f3d11e73be5cb0f7a97a528fedad87624b97f (patch) | |
| tree | 0a2a0c5f1e091d80eb6f173e0ff146df095940d8 /supervisor/shared | |
| parent | 0802b22ed6229a981d26e5d89737877cfb044f61 (diff) | |
wip
Diffstat (limited to 'supervisor/shared')
| -rw-r--r-- | supervisor/shared/serial.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c index 303f89e75..6199af379 100644 --- a/supervisor/shared/serial.c +++ b/supervisor/shared/serial.c @@ -94,7 +94,6 @@ bool serial_bytes_available(void) { return tud_cdc_available() > 0; #endif } - void serial_write_substring(const char* text, uint32_t length) { if (length == 0) { return; @@ -119,3 +118,13 @@ void serial_write_substring(const char* text, uint32_t length) { void serial_write(const char* text) { serial_write_substring(text, strlen(text)); } + +#if CIRCUITPY_USB_SERIAL2 +bool serial2_bytes_available(void) { + return tud_cdc_n_available(1) > 0; +} + +bool serial2_connected(void) { + return tud_cdc_n_connected(1); +} +#endif |
