nRF5 SDK for Mesh v3.2.0  08c60f6

Flash Manager definitions. More...

Macros

#define FLASH_MANAGER_DATA_PER_PAGE   (PAGE_SIZE - sizeof(flash_manager_metadata_t))
 Number of bytes of data one could fit on a single flash page.
 
#define FLASH_MANAGER_PAGE_COUNT_MINIMUM(DATA_SIZE, LARGEST_ENTRY_SIZE)   (1 + ((DATA_SIZE) / (FLASH_MANAGER_DATA_PER_PAGE - LARGEST_ENTRY_SIZE)))
 Minimum number of pages required to store the given amount of data. More...
 
#define FLASH_MANAGER_HANDLE_MAX   (0x7EFF)
 Highest handle number allowed.
 
#define FLASH_MANAGER_HANDLE_INVALID   (0x0000)
 Invalid handle.
 
#define FLASH_MANAGER_ENTRY_LEN_OVERHEAD   (sizeof(fm_header_t) / WORD_SIZE)
 Overhead in each entry's len field for the header.
 

Detailed Description

Flash Manager definitions.

Macro Definition Documentation

◆ FLASH_MANAGER_PAGE_COUNT_MINIMUM

#define FLASH_MANAGER_PAGE_COUNT_MINIMUM (   DATA_SIZE,
  LARGEST_ENTRY_SIZE 
)    (1 + ((DATA_SIZE) / (FLASH_MANAGER_DATA_PER_PAGE - LARGEST_ENTRY_SIZE)))

Minimum number of pages required to store the given amount of data.

Note
As we'll pad a page if the current page can't fit a new entry, we have to assume the worst case in this calculation, which is that the largest possible entry is added at the end of every page without fitting.

Definition at line 74 of file flash_manager.h.