mirror of
https://github.com/micropython/micropython.git
synced 2025-08-29 05:50:40 +02:00
stm32/uart: Fix uart_rx_any in case of no buffer to return 0 or 1.
This commit is contained in:
@@ -517,7 +517,7 @@ mp_uint_t uart_rx_any(pyb_uart_obj_t *self) {
|
||||
} else if (buffer_bytes > 0) {
|
||||
return buffer_bytes;
|
||||
} else {
|
||||
return UART_RXNE_IS_SET(self->uartx);
|
||||
return UART_RXNE_IS_SET(self->uartx) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user