raising and failing edge capture on TIM4
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index 4240f0c..ff45998 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/tsensor.h>
+
+//void sleep() {
+//
+//     __asm__ __volatile__("wfe");
+//
+//}
 
 void main()
 {
@@ -31,8 +39,9 @@ void main()
        uart_init();
 //     cputs("ROBSYS LOADING...\n");
        systick_init();
-       led_init();
+//     tsensor_output(0xFFFF, 0x7FFF);
 
+       init_printf(NULL, putc);
        // SPEED_TEST
 /*     cputs("START TEST (8MHz) \n");
        int a;
@@ -50,9 +59,14 @@ void main()
                a + 2;  
        }
        cputs("END TEST\n"); */
-
        sysinfo();
 
+
+       tsensor_input(5000);
+
+       led_init();
+       rtc_init();
+
 //     tm1637_init();
 //     tm1637_start();