From 366f1cf1863bad626af10347f8ff3d0ef7f6ea2b Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Wed, 24 Apr 2024 16:32:56 +0700 Subject: [PATCH] Fix bsp mistake --- hw/bsp/board.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/bsp/board.c b/hw/bsp/board.c index cdef5e1e5..bb339f613 100644 --- a/hw/bsp/board.c +++ b/hw/bsp/board.c @@ -25,14 +25,6 @@ #include "board_api.h" -//--------------------------------------------------------------------+ -// Board API -//--------------------------------------------------------------------+ -int board_getchar(void) { - char c; - return (sys_read(0, &c, 1) > 0) ? (int) c : (-1); -} - //--------------------------------------------------------------------+ // newlib read()/write() retarget //--------------------------------------------------------------------+ @@ -134,3 +126,11 @@ FILE *const stdin = &__stdio; __strong_reference(stdin, stdout); __strong_reference(stdin, stderr); #endif + +//--------------------------------------------------------------------+ +// Board API +//--------------------------------------------------------------------+ +int board_getchar(void) { + char c; + return (sys_read(0, &c, 1) > 0) ? (int) c : (-1); +}