[libc] Add fputc/fgetc implementation for MICROLIB

This commit is contained in:
Bernard Xiong 2016-02-01 12:19:22 +08:00
parent c0628833f3
commit f677db1ff5
1 changed files with 16 additions and 0 deletions

View File

@ -273,3 +273,19 @@ int system(const char *string)
for (;;); for (;;);
} }
#endif #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