Fix RP2040 UART

It couldn't receive more than 32 bytes in while checking in_waiting
because in_waiting didn't turn interrupts back on correctly.

Fixes #6579
This commit is contained in:
Scott Shawcroft 2022-07-11 13:36:44 -07:00
parent d8447de0b0
commit d9f6e99942
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) {
// The UART only interrupts after a threshold so make sure to copy anything
// out of its FIFO before measuring how many bytes we've received.
_copy_into_ringbuf(&self->ringbuf, self->uart);
irq_set_enabled(self->uart_irq_id, false);
irq_set_enabled(self->uart_irq_id, true);
return ringbuf_num_filled(&self->ringbuf);
}