From 74081ebc421ca63e090ae8027a634a0c1b8f6864 Mon Sep 17 00:00:00 2001 From: asterix Date: Mon, 13 Sep 2010 16:58:43 +0000 Subject: [PATCH] Update lm3s templates. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4237 38d2e660-2303-0410-9eaa-f027e97ec537 --- .../templates/empty/cfg/cfg_emb_flash.h | 73 +++++++++++++++++++ boards/ek-lm3s1968/templates/empty/main.c | 2 +- .../templates/kernel/cfg/cfg_emb_flash.h | 73 +++++++++++++++++++ boards/ek-lm3s1968/templates/kernel/main.c | 2 +- 4 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 boards/ek-lm3s1968/templates/empty/cfg/cfg_emb_flash.h create mode 100644 boards/ek-lm3s1968/templates/kernel/cfg/cfg_emb_flash.h diff --git a/boards/ek-lm3s1968/templates/empty/cfg/cfg_emb_flash.h b/boards/ek-lm3s1968/templates/empty/cfg/cfg_emb_flash.h new file mode 100644 index 00000000..fcfc5b61 --- /dev/null +++ b/boards/ek-lm3s1968/templates/empty/cfg/cfg_emb_flash.h @@ -0,0 +1,73 @@ +/** + * \file + * + * + * \author Daniele Basile + * + * \brief Configuration file for embedded flash module. + */ + +#ifndef CFG_EMB_FLASH_H +#define CFG_EMB_FLASH_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_FLASH_EMB_LOG_LEVEL LOG_LVL_ERR + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_FLASH_EMB_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Write emb flash timeout. + * For how many milliseconds the cpu wait + * to complete write operation. + * + * $WIZ$ type = "int" + */ +#define CONFIG_FLASH_WR_TIMEOUT 100 + +/** + * Check this to disable embedded flash deprecated API support. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_FLASH_DISABLE_OLD_API 1 + +#endif /* CFG_FLASH_AT91_H */ diff --git a/boards/ek-lm3s1968/templates/empty/main.c b/boards/ek-lm3s1968/templates/empty/main.c index f3ab45f3..e4895270 100644 --- a/boards/ek-lm3s1968/templates/empty/main.c +++ b/boards/ek-lm3s1968/templates/empty/main.c @@ -83,7 +83,7 @@ static void init(void) /* Initialize the keypad driver */ kbd_init(); /* Initialize the internal flash memory */ - flash_init(&flash); + flash_init(&flash, 0); } int main(void) diff --git a/boards/ek-lm3s1968/templates/kernel/cfg/cfg_emb_flash.h b/boards/ek-lm3s1968/templates/kernel/cfg/cfg_emb_flash.h new file mode 100644 index 00000000..fcfc5b61 --- /dev/null +++ b/boards/ek-lm3s1968/templates/kernel/cfg/cfg_emb_flash.h @@ -0,0 +1,73 @@ +/** + * \file + * + * + * \author Daniele Basile + * + * \brief Configuration file for embedded flash module. + */ + +#ifndef CFG_EMB_FLASH_H +#define CFG_EMB_FLASH_H + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define CONFIG_FLASH_EMB_LOG_LEVEL LOG_LVL_ERR + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define CONFIG_FLASH_EMB_LOG_FORMAT LOG_FMT_TERSE + + +/** + * Write emb flash timeout. + * For how many milliseconds the cpu wait + * to complete write operation. + * + * $WIZ$ type = "int" + */ +#define CONFIG_FLASH_WR_TIMEOUT 100 + +/** + * Check this to disable embedded flash deprecated API support. + * + * $WIZ$ type = "boolean" + */ +#define CONFIG_FLASH_DISABLE_OLD_API 1 + +#endif /* CFG_FLASH_AT91_H */ diff --git a/boards/ek-lm3s1968/templates/kernel/main.c b/boards/ek-lm3s1968/templates/kernel/main.c index 34ad1c65..31408ec3 100644 --- a/boards/ek-lm3s1968/templates/kernel/main.c +++ b/boards/ek-lm3s1968/templates/kernel/main.c @@ -87,7 +87,7 @@ static void init(void) /* Initialize the keypad driver */ kbd_init(); /* Initialize the internal flash memory */ - flash_init(&flash); + flash_init(&flash, 0); /* * Kernel initialization: processes (allow to create and dispatch -- 2.25.1