commit | d09829dcc60437dd350a127c5640e8758530c643 | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@gnumonks.org> | Mon Feb 27 22:58:59 2017 +0100 |
committer | Harald Welte <laforge@gnumonks.org> | Mon Feb 27 23:00:26 2017 +0100 |
tree | fe58112be16545df068379038c19bae00fd41f36 | |
parent | d52523185f2da32a0c9070b17ba49edc9ed3823f [diff] [blame] |
Remove newlib dependency, include own stdio/string/assert
diff --git a/firmware/libcommon/source/fputs.c b/firmware/libcommon/source/fputs.c new file mode 100644 index 0000000..f7add10 --- /dev/null +++ b/firmware/libcommon/source/fputs.c
@@ -0,0 +1,15 @@ +#include <stdio.h> +#include "uart_console.h" + +int fputc(int c, FILE *stream) +{ + UART_PutChar(c); + return c; +} + +int fputs(const char *s, FILE *stream) +{ + while (*s != '\0') + UART_PutChar(*s++); + return 0; +}