st3375s: linked to stdout, printf, works as an olscool VGA screen now
[cortex-from-scratch] / lib / stdio.c
index 6b0f2a2..76e1f28 100644 (file)
 
 #include <lib/stdio.h>
 #include <lib/string.h>
+
 #include <drivers/uart.h>
+#include <drivers/st7735s.h>
 
 #define SERIAL 1
-#define TFT 0
+#define TFT 1
 #define BUFSIZE 256
 
 static char stdbuf[BUFSIZE];
@@ -42,6 +44,9 @@ void cputchar(char c) {
        if (SERIAL) {
                uart_putc(c);
        }
+       if (TFT) {
+               tft_putc(0xFFFF, 0x0000, c);
+       }
 
 }