Exported Functions
- group Mesh_Flash_Exported_Functions
-
Defines
-
mesh_flash_save(pdata, size, offset) ftl_save(pdata, offset, size)
-
Save the data to the flash similarly as to RAM.
This macro wraps the function to save data to flash storage handling the complexities of read/erase/write internally.
- Parameters:
pdata – [in] The data pointer.
size – [in] The data size.
offset – [in] The data offset in flash.
- Return values:
0 – Success.
!0 – Failure.
- Returns:
-
The operation result.
-
mesh_flash_load(pdata, size, offset) ftl_load(pdata, offset, size)
-
Load the data from the flash into RAM.
This macro wraps the function to load data from flash storage handling the complexities of read/erase/write internally.
- Parameters:
pdata – [out] The data pointer.
size – [in] The data size.
offset – [in] The data offset in flash.
- Return values:
0 – Success.
!0 – Failure.
- Returns:
-
The operation result.
Functions
-
mesh_node_state_t mesh_flash_restore_node_state(void)
-
Load the node state from the non-volatile memory (NVM).
This function can be used to retrieve the node state before
mesh_init
. !!!Attention: The function shall be invoked after all models have been registered!!!- Returns:
-
The node state.
-
mesh_flash_save(pdata, size, offset) ftl_save(pdata, offset, size)