Update some triface preset.
[bertos.git] / boards / ek-lm3s1968 / templates / kernel / main.c
index 99aa70571afd54c1c73382eed5de6f3b93ea131d..677553eda3613d2941caeb501db5f4df3743b393 100644 (file)
  * continues to monitor the stack utilization of all the processes.
  */
 
+#include "hw/hw_led.h"
+
 #include <cfg/debug.h>
+
 #include <cpu/irq.h>
-#include <hw/hw_led.h>
+
 #include <drv/timer.h>
 #include <drv/ser.h>
 #include <drv/lcd_rit128x96.h>
 #include <drv/kbd.h>
+#include <drv/flash.h>
+
 #include <kern/proc.h>
 #include <kern/monitor.h>
 
@@ -53,7 +58,9 @@
 static Bitmap lcd_bitmap;
 /* Raster associated to the Bitmap image */
 static uint8_t raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)];
-
+/* Internal flash memory descriptor */
+static Flash flash;
+/* UART port descriptor */
 static Serial out;
 
 static void init(void)
@@ -65,9 +72,14 @@ static void init(void)
        kdbg_init();
        /* Initialize system timer */
        timer_init();
-       /* Initialize UART0 */
-       ser_init(&out, SER_UART0);
-       /* Configure UART0 to work at 115.200 bps */
+       /*
+        * Kernel initialization: processes (allow to create and dispatch
+        * processes using proc_new()).
+        */
+       proc_init();
+       /* Initialize UART1 */
+       ser_init(&out, SER_UART1);
+       /* Configure UART1 to work at 115.200 bps */
        ser_setbaudrate(&out, 115200);
        /* Initialize LED driver */
        LED_INIT();
@@ -79,12 +91,8 @@ static void init(void)
        rit128x96_blitBitmap(&lcd_bitmap);
        /* Initialize the keypad driver */
        kbd_init();
-
-       /*
-        * Kernel initialization: processes (allow to create and dispatch
-        * processes using proc_new()).
-        */
-       proc_init();
+       /* Initialize the internal flash memory */
+       flash_init(&flash, 0);
 }
 
 static void NORETURN led_process(void)
@@ -119,4 +127,6 @@ int main(void)
                monitor_report();
                timer_delay(1000);
        }
+
+       return 0;
 }