From 544acef0986977ef9d3a05d87bb9f55163b1280a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 9 Aug 2020 17:27:08 +0200 Subject: Temporary cpu and serial drivers in libc --- lib/print.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/print.c') diff --git a/lib/print.c b/lib/print.c index 738e42f..1cbed69 100644 --- a/lib/print.c +++ b/lib/print.c @@ -2,7 +2,7 @@ #include #include #include -/* #include */ +#include #include static void append(char *dest, char *src, int index) @@ -80,7 +80,7 @@ int vprintf(const char *format, va_list ap) char buf[1024]; memset(buf, 0, 1024); int len = vsprintf(buf, format, ap); - /* serial_print(buf); // TODO: Remove temporary serial print */ + serial_print(buf); // TODO: Remove temporary serial print return len; } @@ -94,3 +94,9 @@ int printf(const char *format, ...) return len; } + +int print(const char *str) +{ + serial_print(str); + return strlen(str); +} -- cgit v1.2.3