diff options
| author | robert-hh <robert@hammelrath.com> | 2022-07-12 22:51:32 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-07-17 00:13:15 +1000 |
| commit | cca2305211688df0e13a14f67f1eaf67d9cb267e (patch) | |
| tree | 49fcc1fb70ed85f1423974d2fc9c02770cc1b3bc | |
| parent | be6f0f3b3b99820d8aef835a8c2af1a1baaed049 (diff) | |
nrf/drivers/usb: Fix reading of a single USB CDC character.
| -rw-r--r-- | ports/nrf/drivers/usb/usb_cdc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ports/nrf/drivers/usb/usb_cdc.c b/ports/nrf/drivers/usb/usb_cdc.c index 06071fe11..16d69fff6 100644 --- a/ports/nrf/drivers/usb/usb_cdc.c +++ b/ports/nrf/drivers/usb/usb_cdc.c @@ -126,9 +126,7 @@ static void cdc_task(bool tx) if ( tud_cdc_connected() ) { // connected and there are data available while (tud_cdc_available()) { - int c; - uint32_t count = tud_cdc_read(&c, 1); - (void)count; + int c = tud_cdc_read_char(); if (c == mp_interrupt_char) { rx_ringbuf.iget = 0; rx_ringbuf.iput = 0; |
