|
|
@@ -106,6 +106,7 @@ TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
|
|
|
int rd = (int) SEGGER_RTT_Read(0, buf, count);
|
|
|
return (rd > 0) ? rd : -1;
|
|
|
}
|
|
|
+
|
|
|
#endif
|
|
|
|
|
|
#elif defined(LOGGER_SWO)
|
|
|
@@ -149,3 +150,9 @@ TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
+
|
|
|
+int board_getchar(void)
|
|
|
+{
|
|
|
+ char c;
|
|
|
+ return ( sys_read(0, &c, 1) > 0 ) ? (int) c : (-1);
|
|
|
+}
|