st7735s: signs of life
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index 221d7d6..8de2880 100644 (file)
--- a/main.c
+++ b/main.c
 
 #include <drivers/uart.h>
 #include <drivers/led.h>
-#include <drivers/tm1637.h>
+//#include <drivers/tm1637.h>
 //#include <drivers/at24c.h>
-#include <drivers/tsensor.h>
+//#include <drivers/tsensor.h>
+//#include <drivers/mk450_joystick.h>
+#include <drivers/st7735s.h>
 
 void main()
 {
@@ -43,6 +45,7 @@ void main()
         * by the more accurate RTC.
        systick_init();
        */
+       
 
        /* Set up a very small libc library */
        init_printf(NULL, putc);
@@ -62,11 +65,26 @@ void main()
        */
        
        /* LED Segment Driver */
-       tm1637_init();
+       //tm1637_init();
+
+       /* ASM Blocking routine */
+       //for (int i = 0; i < 1000; i++)
+       //      _block(10000);
+
+       /* TEMP SENSOR 
+       tsensor_printid();
+       uint16_t temp = tsensor_get_temp();
+       printf("Current temperature: %d °C\n", temp); */
+
+       /* ADC Joystick module */
+       // mk450_init();        
+
+       /* TFT screen */
+       tft_init();
 
        /* Start up terminal */
        terminal();
-
+       
        /* Should not be here, endless loop */
        for(;;) {