1
0
Эх сурвалжийг харах

[libc] Add fputc/fgetc implementation for MICROLIB

Bernard Xiong 9 жил өмнө
parent
commit
f677db1ff5

+ 16 - 0
components/libc/armlibc/stubs.c

@@ -273,3 +273,19 @@ int system(const char *string)
     for (;;);
 }
 #endif
+
+#ifdef __MICROLIB
+#include <stdio.h>
+
+int fputc(int c, FILE *f) 
+{
+    char ch = c;
+
+    rt_kprintf(&ch);
+    return 1;
+}
+
+int fgetc(FILE *f) {
+  return -1;
+}
+#endif