[efr32] unify flash config around SETTINGS_CONFIG_PAGE_NUM (#3620)

This commit is contained in:
Jonathan Hui
2019-02-25 09:26:26 -08:00
committed by GitHub
parent a0db3b5b46
commit 5cf3540f6e
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -31,6 +31,8 @@
* This file implements the OpenThread platform abstraction for the non-volatile storage.
*/
#include <openthread-core-config.h>
#include <openthread/config.h>
#include <openthread/platform/alarm-milli.h>
@@ -40,9 +42,8 @@
#include "em_msc.h"
// clang-format off
#define FLASH_DATA_USED_PAGES 10
#define FLASH_DATA_END_ADDR (FLASH_BASE + FLASH_SIZE)
#define FLASH_DATA_START_ADDR (FLASH_DATA_END_ADDR - (FLASH_PAGE_SIZE * FLASH_DATA_USED_PAGES))
#define FLASH_DATA_START_ADDR (FLASH_DATA_END_ADDR - (FLASH_PAGE_SIZE * SETTINGS_CONFIG_PAGE_NUM))
// clang-format on
static inline uint32_t mapAddress(uint32_t aAddress)
@@ -32,6 +32,8 @@
* for OpenThread.
*/
#include "em_msc.h"
#ifndef OPENTHREAD_CORE_EFR32_CONFIG_H_
#define OPENTHREAD_CORE_EFR32_CONFIG_H_
@@ -90,7 +92,7 @@
* The page size of settings.
*
*/
#define SETTINGS_CONFIG_PAGE_SIZE 0x800
#define SETTINGS_CONFIG_PAGE_SIZE FLASH_PAGE_SIZE
/**
* @def SETTINGS_CONFIG_PAGE_NUM