mirror of
https://github.com/espressif/openthread.git
synced 2026-08-23 10:49:51 +00:00
[efr32] unify flash config around SETTINGS_CONFIG_PAGE_NUM (#3620)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user