From 4e7db9c60d9ff77b3e0de14ecdfeb372813c46b7 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Wed, 29 Apr 2026 22:11:36 +0200 Subject: fixup Signed-off-by: HiFiPhile --- hw/bsp/board.c | 2 +- hw/bsp/ft9xx/family.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/bsp/board.c b/hw/bsp/board.c index 65b44e5f2..5093382d9 100644 --- a/hw/bsp/board.c +++ b/hw/bsp/board.c @@ -171,7 +171,7 @@ int board_getchar(void) { } int board_putchar(int c) { - if (board_uart_write((const char *)&c, 1)) { + if (board_uart_write((const char *)&c, 1) > 0) { return c; } else { return -1; diff --git a/hw/bsp/ft9xx/family.c b/hw/bsp/ft9xx/family.c index a1c50e1b7..0ca2663ac 100644 --- a/hw/bsp/ft9xx/family.c +++ b/hw/bsp/ft9xx/family.c @@ -221,8 +221,8 @@ int board_uart_read(uint8_t *buf, int len) // Send characters to UART int board_uart_write(void const *buf, int len) { - int count = 0; #ifdef BOARD_UART + int count = 0; uint8_t const *p = (uint8_t const *) buf; while (count < len) { if (BOARD_UART->LSR_ICR_XON2 & MASK_UART_LSR_THRE) { -- cgit v1.3.1