Skip to content

Commit cca2305

Browse files
robert-hhdpgeorge
authored andcommitted
nrf/drivers/usb: Fix reading of a single USB CDC character.
1 parent be6f0f3 commit cca2305

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ports/nrf/drivers/usb/usb_cdc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ static void cdc_task(bool tx)
126126
if ( tud_cdc_connected() ) {
127127
// connected and there are data available
128128
while (tud_cdc_available()) {
129-
int c;
130-
uint32_t count = tud_cdc_read(&c, 1);
131-
(void)count;
129+
int c = tud_cdc_read_char();
132130
if (c == mp_interrupt_char) {
133131
rx_ringbuf.iget = 0;
134132
rx_ringbuf.iput = 0;

0 commit comments

Comments
 (0)