tm1637 signs of life, terminal builtin cmds
[cortex-from-scratch] / main.c
diff --git a/main.c b/main.c
index c5ee202..342059e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -17,6 +17,9 @@
 #include <sys/robsys.h> 
 #include <sys/mmap.h>
 
+#include <lib/regfunc.h>
+#include <lib/stdio.h>
+
 #include <drivers/uart.h>
 #include <drivers/led.h>
 #include <drivers/tm1637.h>
 void main()
 {
        ivt_init();
-       
        uart_init();
+//     cputs("ROBSYS LOADING...\n");
        systick_init();
-
        led_init();
-       
        sysinfo();
 
+       tm1637_init();
+       tm1637_start();
+
+       //uint32_t test = hextoreg("12345678");
+               
+//     cputs(regtohex(test));
+
        //extern void stub();
        //stub();
        //__asm__ __volatile__ ("ldc p1, cr1, r0");
 
-       while(1) {
+/*     while(1) {
                int r;
                for (int i = 0; i < 50000; i++) {
                        r = 0;  
@@ -46,8 +54,8 @@ void main()
                        r = 0;  
                }
                led_off();
-       }
-       // terminal();
+       } */
+       terminal();
 
        for(;;) {