basic heap implementation
[cortex-from-scratch] / lib / stdio.c
index 9ef20ee..0149eba 100644 (file)
@@ -1,10 +1,26 @@
+/* (CC-BY-NC-SA) ROBIN KRENS - ROBIN @ ROBINKRENS.NL
+ * 
+ * $LOG$
+ * 2019/7/23 - ROBIN KRENS     
+ * Initial version 
+ * 
+ * $DESCRIPTION$
+ * The 'classic' putc and getchar functions. Should not be used directly
+ * use the tinyprintf library instead
+ *
+ * Can be extended for multiple interfaces (serial, tft or oled screens)
+ *
+ */
+
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
 
 #include <lib/stdio.h>
 #include <lib/string.h>
+
 #include <drivers/uart.h>
+#include <drivers/st7735s.h>
 
 #define SERIAL 1
 #define TFT 0
@@ -28,6 +44,9 @@ void cputchar(char c) {
        if (SERIAL) {
                uart_putc(c);
        }
+       if (TFT) {
+               tft_putc(0xFFFF, 0x0000, c);
+       }
 
 }