lm3s1968: add internal flash memory initialization to "empty" and "kernel" templates.
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 26 May 2010 13:36:37 +0000 (13:36 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 26 May 2010 13:36:37 +0000 (13:36 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3839 38d2e660-2303-0410-9eaa-f027e97ec537

boards/ek-lm3s1968/templates/empty/main.c
boards/ek-lm3s1968/templates/empty/project.bertos
boards/ek-lm3s1968/templates/kernel/main.c
boards/ek-lm3s1968/templates/kernel/project.bertos

index 9ca44575ecd0c0b8a932ee5886c16efb96aff420..b6df37c952141834db6aa524e93acf24548b8688 100644 (file)
 #include <drv/ser.h>
 #include <drv/lcd_rit128x96.h>
 #include <drv/kbd.h>
+#include <drv/flash.h>
 
 /* Bitmap to display on the OLED display */
 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)
@@ -76,6 +79,8 @@ static void init(void)
        rit128x96_blitBitmap(&lcd_bitmap);
        /* Initialize the keypad driver */
        kbd_init();
+       /* Initialize the internal flash memory */
+        flash_init(&flash);
 }
 
 int main(void)
index 9cace4d6a92e07b31c219b2d7c47e9989eebffde..e3b90efbcc0e0326c9e489eefbee3d213a0f2137 100644 (file)
@@ -52,34 +52,36 @@ aS'kbd'
 p26
 aS'formatwr'
 p27
-aS'kfile'
+aS'flash'
 p28
-aS'lcd_rit128x96'
+aS'kfile'
 p29
-aS'heap'
+aS'lcd_rit128x96'
 p30
-aS'timer'
+aS'heap'
 p31
-aS'debug'
+aS'timer'
 p32
-aS'lm3s_ssi'
+aS'debug'
 p33
-asS'CPU_NAME'
+aS'lm3s_ssi'
 p34
-VLM3S1968
+asS'CPU_NAME'
 p35
-sS'PROJECT_HW_PATH'
+VLM3S1968
 p36
-S'../..'
+sS'PROJECT_HW_PATH'
 p37
-sS'PROJECT_SRC_PATH'
+S'../..'
 p38
-S'.'
+sS'PROJECT_SRC_PATH'
 p39
-sS'PRESET'
+S'.'
 p40
+sS'PRESET'
+p41
 I01
 sS'OUTPUT'
-p41
-(lp42
+p42
+(lp43
 s.
\ No newline at end of file
index 99aa70571afd54c1c73382eed5de6f3b93ea131d..68fdf45fc59e56a06135b3ed5352b79c2ce1bd21 100644 (file)
@@ -46,6 +46,7 @@
 #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 +54,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)
@@ -79,6 +82,8 @@ static void init(void)
        rit128x96_blitBitmap(&lcd_bitmap);
        /* Initialize the keypad driver */
        kbd_init();
+       /* Initialize the internal flash memory */
+        flash_init(&flash);
 
        /*
         * Kernel initialization: processes (allow to create and dispatch
index de46c7930e44c7b31b7ae4db271b3ade2f5e4367..b4e22a3f70de53a8295ae271eb65b14d55900d31 100644 (file)
@@ -52,13 +52,13 @@ aS'kernel'
 p26
 aS'kbd'
 p27
-aS'semaphores'
-p28
 aS'monitor'
-p29
+p28
 aS'formatwr'
+p29
+aS'flash'
 p30
-aS'debug'
+aS'semaphores'
 p31
 aS'kfile'
 p32
@@ -70,24 +70,26 @@ aS'signal'
 p35
 aS'timer'
 p36
-aS'lm3s_ssi'
+aS'debug'
 p37
-asS'CPU_NAME'
+aS'lm3s_ssi'
 p38
-VLM3S1968
+asS'CPU_NAME'
 p39
-sS'PROJECT_HW_PATH'
+VLM3S1968
 p40
-S'../..'
+sS'PROJECT_HW_PATH'
 p41
-sS'PROJECT_SRC_PATH'
+S'../..'
 p42
-S'.'
+sS'PROJECT_SRC_PATH'
 p43
-sS'PRESET'
+S'.'
 p44
+sS'PRESET'
+p45
 I01
 sS'OUTPUT'
-p45
-(lp46
+p46
+(lp47
 s.
\ No newline at end of file