mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 11:17:46 +00:00
[samr21] Define SETTINGS_CONFIG_PAGE_NAME with const (#3491)
Currently SETTINGS_CONFIG_PAGE_NAME is defined indirectly by addresses of __d_nv_mem_start and __d_nv_mem_end. But such definition doesn't allow to perform compile time sanity check. Define this macro with const value 16. Signed-off-by: Oleksandr Grytsov <[email protected]>
This commit is contained in:
committed by
Jonathan Hui
parent
e7a6bde56d
commit
c31ab99080
@@ -69,8 +69,15 @@ extern uint32_t __d_nv_mem_end;
|
||||
*
|
||||
* The page number of settings.
|
||||
*
|
||||
* This value should not exceeds:
|
||||
* (((uint32_t)&__d_nv_mem_end - (uint32_t)&__d_nv_mem_start) / SETTINGS_CONFIG_PAGE_SIZE)
|
||||
*
|
||||
* __d_nv_mem_start and __d_nv_mem_end is defined in linker script.
|
||||
* The size of NVRAM region is 4k. Page size is 256 bytes. Maximum SETTINGS_CONFIG_PAGE_NUM
|
||||
* should be equal or less than 16.
|
||||
*
|
||||
*/
|
||||
#define SETTINGS_CONFIG_PAGE_NUM (((uint32_t)&__d_nv_mem_end - (uint32_t)&__d_nv_mem_start) / SETTINGS_CONFIG_PAGE_SIZE)
|
||||
#define SETTINGS_CONFIG_PAGE_NUM 16
|
||||
|
||||
/**
|
||||
* @def RADIO_CONFIG_SRC_MATCH_ENTRY_NUM
|
||||
|
||||
Reference in New Issue
Block a user