summaryrefslogtreecommitdiff
path: root/src/arch/posix
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-12-08 15:07:52 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-12-08 15:07:52 +0100
commitdcf84169ae75b11c1656d45dbc6c626d93da6a10 (patch)
treed78ad84e6aba1f5f13037e40141013f3a3061d54 /src/arch/posix
parent56f2d90751f1c1b2db925da215a14721cf18d483 (diff)
Add output support (broken on esp8266)
Diffstat (limited to 'src/arch/posix')
-rw-r--r--src/arch/posix/Makefile.inc1
-rw-r--r--src/arch/posix/driver/stdout.cc14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/posix/Makefile.inc b/src/arch/posix/Makefile.inc
index caf16a7..9dd723d 100644
--- a/src/arch/posix/Makefile.inc
+++ b/src/arch/posix/Makefile.inc
@@ -5,6 +5,7 @@ CXX = g++
INCLUDES += -Iinclude/posix
TARGETS += src/arch/posix/arch.cc src/arch/posix/driver/gpio.cc
+TARGETS += src/arch/posix/driver/stdout.cc
OBJECTS = ${TARGETS:.cc=.o}
diff --git a/src/arch/posix/driver/stdout.cc b/src/arch/posix/driver/stdout.cc
new file mode 100644
index 0000000..e409389
--- /dev/null
+++ b/src/arch/posix/driver/stdout.cc
@@ -0,0 +1,14 @@
+#include "driver/stdout.h"
+#include <stdio.h>
+
+void StandardOutput::put(char c)
+{
+ fputc(c, stdout);
+}
+
+void StandardOutput::flush()
+{
+ fflush(stdout);
+}
+
+StandardOutput kout;