rtc example with tm1637 driver
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index 4240f0c..da28711 100644 (file)
--- a/main.c
+++ b/main.c
 
 #include <lib/regfunc.h>
 #include <lib/stdio.h>
+#include <lib/tinyprintf.h>
 
 #include <drivers/uart.h>
 #include <drivers/led.h>
 #include <drivers/tm1637.h>
+#include <drivers/at24c.h>
+#include <drivers/tsensor.h>
+
+//void sleep() {
+//
+//     __asm__ __volatile__("wfe");
+//
+//}
 
 void main()
 {
@@ -30,9 +39,10 @@ void main()
        ivt_init();
        uart_init();
 //     cputs("ROBSYS LOADING...\n");
-       systick_init();
-       led_init();
+       //systick_init();
+//     tsensor_output(0xFFFF, 0x7FFF);
 
+       init_printf(NULL, putc);
        // SPEED_TEST
 /*     cputs("START TEST (8MHz) \n");
        int a;
@@ -50,11 +60,19 @@ void main()
                a + 2;  
        }
        cputs("END TEST\n"); */
-
        sysinfo();
 
-//     tm1637_init();
-//     tm1637_start();
+
+//     tsensor_input(5000);
+//     run();
+
+       led_init();
+//     eeprom_at24c_init();
+//     eeprom_test();
+       tm1637_init();
+
+       rtc_init();
+
 
        //uint32_t test = hextoreg("12345678");