X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fek-lm3s1968%2Ftemplates%2Fkernel%2Fmain.c;h=677553eda3613d2941caeb501db5f4df3743b393;hb=56f2c002c50338f23f1b969ba51a43b0eb24f3da;hp=99aa70571afd54c1c73382eed5de6f3b93ea131d;hpb=b99421f706c4f6978a6d399cba3bf4d9a383cb2c;p=bertos.git diff --git a/boards/ek-lm3s1968/templates/kernel/main.c b/boards/ek-lm3s1968/templates/kernel/main.c index 99aa7057..677553ed 100644 --- a/boards/ek-lm3s1968/templates/kernel/main.c +++ b/boards/ek-lm3s1968/templates/kernel/main.c @@ -39,13 +39,18 @@ * continues to monitor the stack utilization of all the processes. */ +#include "hw/hw_led.h" + #include + #include -#include + #include #include #include #include +#include + #include #include @@ -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; }