Add kernel test.
[bertos.git] / app / at91sam7s / at91sam7s.c
index 3756d91851f865912f8452e6d1f26f8408d27140..4e75cf4e6372fa505bf62125fe3c0f398858fae6 100644 (file)
  * \brief AT91SAM7S-EK porting test.
  */
 
+#include <cfg/macros.h>
 #include <drv/timer.h>
 #include <drv/sysirq_at91.h>
+#include <kern/proc.h>
+#include <drv/ser.h>
 #include <cfg/macros.h>
 #include <io/arm.h>
 
@@ -75,7 +78,19 @@ int main(void)
        kdbg_init();
        sysirq_init();
        timer_init();
+
+       proc_init();
+       ASSERT(!IRQ_GETSTATE());
+
+
+
+       /* Open the main communication port */
+       Serial *host_port = ser_open(0);
+       ser_setbaudrate(host_port, 115200);
+       ser_setparity(host_port, SER_PARITY_NONE);
+
        IRQ_ENABLE;
+       ASSERT(IRQ_GETSTATE());
 
        /* Disable all pullups */
        PIOA_PUDR = 0xffffffff;
@@ -95,11 +110,12 @@ int main(void)
        timer_setDelay(&leds_timer, ms_to_ticks(100));
        timer_add(&leds_timer);
 
-
        // Main loop
        for(;;)
        {
+               ser_printf(host_port," %s", "a");
                kprintf("W la figa!\n");
+               proc_test();
                iort+= 1;
                iort1+= 1;
                iort2+= 1;