summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-04-29 22:11:36 +0200
committerHiFiPhile <[email protected]>2026-04-29 22:11:36 +0200
commit4e7db9c60d9ff77b3e0de14ecdfeb372813c46b7 (patch)
treea398be8b016d6e6fdbcdb8ef0fa5faa6796745aa
parent4722252558d4b2a5d77fff7a59ab9c9e51befe47 (diff)
fixup
Signed-off-by: HiFiPhile <[email protected]>
-rw-r--r--hw/bsp/board.c2
-rw-r--r--hw/bsp/ft9xx/family.c2
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) {