|
|
|
@ -250,10 +250,10 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size_t rx_bytes = 0;
|
|
|
|
|
uint64_t start_ticks = ticks_ms;
|
|
|
|
|
uint64_t start_ticks = supervisor_ticks_ms64();
|
|
|
|
|
|
|
|
|
|
// Wait for all bytes received or timeout, same as nrf
|
|
|
|
|
while ( (ringbuf_count(&self->rbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) {
|
|
|
|
|
while ( (ringbuf_count(&self->rbuf) < len) && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms) ) {
|
|
|
|
|
RUN_BACKGROUND_TASKS;
|
|
|
|
|
//restart if it failed in the callback
|
|
|
|
|
if (errflag != HAL_OK) {
|
|
|
|
|