diff options
Diffstat (limited to 'firmware/zpu/lib/udp_uart.c')
-rw-r--r-- | firmware/zpu/lib/udp_uart.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/zpu/lib/udp_uart.c b/firmware/zpu/lib/udp_uart.c index 6f6b9ee91..a3940c05f 100644 --- a/firmware/zpu/lib/udp_uart.c +++ b/firmware/zpu/lib/udp_uart.c @@ -94,8 +94,9 @@ void udp_uart_poll(void){ //read all characters we can without blocking for (size_t j = state->len; j < sizeof(_states[0].buf); j++){ - uint8_t ch = hal_uart_getc_noblock((hal_uart_name_t)i); - if (ch == 255) break; + int ret = hal_uart_getc_noblock((hal_uart_name_t)i); + if (ret == -1) break; + char ch = (char) ret; if (ch == '\n' || ch == '\r') newline = true; state->buf[j] = ch; state->len++; |