Skip to content
Snippets Groups Projects
Commit 5d1bd6fb authored by David Sidrane's avatar David Sidrane Committed by Julian Oes
Browse files

TAP used FLASH Based parameter storage - needs timing eval

parent 8d13dba0
No related branches found
No related tags found
No related merge requests found
......@@ -236,6 +236,9 @@ __BEGIN_DECLS
#define KEY_AD_GPIO (GPIO_INPUT|GPIO_PULLDOWN|GPIO_EXTI|GPIO_PORTC|GPIO_PIN1)
#define POWER_ON_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4)
#define POWER_OFF_GPIO (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN4)
#define FLASH_BASED_PARAMS
/****************************************************************************************************
* Public Types
****************************************************************************************************/
......
......@@ -57,6 +57,8 @@
#include <nuttx/i2c.h>
#include <nuttx/analog/adc.h>
#include "stm32.h"
#include "board_config.h"
#include "stm32_uart.h"
......@@ -68,6 +70,10 @@
#include <systemlib/cpuload.h>
# if defined(FLASH_BASED_PARAMS)
# include <systemlib/flashparams/flashfs.h>
#endif
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
......@@ -179,6 +185,25 @@ __EXPORT int nsh_archinitialize(void)
led_off(LED_AMBER);
led_off(LED_BLUE);
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t sector_map[] = {
{1, 16 * 1024, 0x08004000},
{2, 16 * 1024, 0x08008000},
{0, 0, 0},
};
/* Initalizee the flashfs layer to use heap allocated memory */
result = parameter_flashfs_init(sector_map, NULL, 0);
if (result != OK) {
message("[boot] FAILED to init params in FLASH %d\n", result);
up_ledon(LED_AMBER);
return -ENODEV;
}
#endif
/* Init the microSD slot */
result = board_sdio_initialize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment