aboutsummaryrefslogtreecommitdiff
path: root/lib/print.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-09 17:27:08 +0200
committerMarvin Borner2020-08-09 17:27:08 +0200
commit544acef0986977ef9d3a05d87bb9f55163b1280a (patch)
tree764d28f454b818c3ac19d59df17ecd914f9d7ecf /lib/print.c
parent162d024a53e1e31e00ff0b6f47dd4590edebc551 (diff)
Temporary cpu and serial drivers in libc
Diffstat (limited to 'lib/print.c')
-rw-r--r--lib/print.c10
1 files changed, 8 insertions, 2 deletions
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 <conv.h>
#include <def.h>
#include <mem.h>
-/* #include <serial.h> */
+#include <serial.h>
#include <str.h>
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);
+}