summaryrefslogtreecommitdiff
path: root/hw/bsp/board.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-24 16:17:33 +0700
committerhathach <[email protected]>2024-04-24 16:17:33 +0700
commitb67cb26e51c7f31db0cf71c6c1ce5430bbbbb7f5 (patch)
treed0564614430496e537574881b516ad589e201a4a /hw/bsp/board.c
parenteaec0fb13998ab642bd63981e8d0686fab0b347c (diff)
change hil board s3 devkitm (devkitc seems to have usb issue with cp2104)
Diffstat (limited to 'hw/bsp/board.c')
-rw-r--r--hw/bsp/board.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 996ac9263..cdef5e1e5 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -26,6 +26,14 @@
#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
//--------------------------------------------------------------------+
#ifdef __ICCARM__
@@ -126,8 +134,3 @@ FILE *const stdin = &__stdio;
__strong_reference(stdin, stdout);
__strong_reference(stdin, stderr);
#endif
-
-int board_getchar(void) {
- char c;
- return (sys_read(0, &c, 1) > 0) ? (int) c : (-1);
-}