basic led gpio driver
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index 35b718e..c5ee202 100644 (file)
--- a/main.c
+++ b/main.c
@@ -5,6 +5,8 @@
  * Initial version 
  * 
  * $DESCRIPTION$
+ * Main intialize basic components of the boards
+ * and jumps to a terminal
  *
  * */
 
 #include <sys/mmap.h>
 
 #include <drivers/uart.h>
+#include <drivers/led.h>
+#include <drivers/tm1637.h>
 
 void main()
 {
        ivt_init();
+       
        uart_init();
-
        systick_init();
+
+       led_init();
        
        sysinfo();
 
-       extern void stub();
+       //extern void stub();
        //stub();
        //__asm__ __volatile__ ("ldc p1, cr1, r0");
 
-       terminal();
+       while(1) {
+               int r;
+               for (int i = 0; i < 50000; i++) {
+                       r = 0;  
+               }
+               led_on();
+               for (int i = 0; i < 50000; i++) {
+                       r = 0;  
+               }
+               led_off();
+       }
+       // terminal();
 
        for(;;) {