summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-12-29 22:43:35 +1100
committerDamien George <damien.p.george@gmail.com>2018-12-29 22:43:35 +1100
commita5f7a3022d4273257f6fa26f9743a4a6f30791e7 (patch)
treed088a17f9dd41c340bf9f86dde3e8629ff7525dc
parent372e7a4dc6f565ac75b58e960fb480b520b9a07e (diff)
stm32/uart: Fix uart_rx_any in case of no buffer to return 0 or 1.
-rw-r--r--ports/stm32/uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/uart.c b/ports/stm32/uart.c
index 74e601f3b..4031d8acd 100644
--- a/ports/stm32/uart.c
+++ b/ports/stm32/uart.c
@@ -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;
}
}