12#ifndef __MESHX_NVS_H__
13#define __MESHX_NVS_H__
19#define MESHX_NVS_TIMER_PERIOD_DEF 1000
21#ifndef MESHX_NVS_TIMER_PERIOD
22#define MESHX_NVS_TIMER_PERIOD MESHX_NVS_TIMER_PERIOD_DEF
25#define MESHX_NVS_AUTO_COMMIT true
26#define MESHX_NVS_NO_AUTO_COMMIT false
37#ifdef MESHX_NVS_TIMER_PERIOD
Header file for the control task in the BLE mesh node application.
meshx_err_t
MeshX Error Codes.
meshx_err_t meshx_nvs_element_ctx_set(uint16_t element_id, const void *blob, size_t blob_size)
Store the context of a specific element to NVS.
meshx_err_t meshx_nvs_init(void)
MeshX NVS Initialisation.
meshx_err_t meshx_nvs_close(void)
Close the NVS handle.
meshx_err_t meshx_nvs_element_ctx_get(uint16_t element_id, void *blob, size_t blob_size)
Retrieve the context of a specific element from NVS.
meshx_err_t meshx_nvs_element_ctx_remove(uint16_t element_id)
Remove the context of a specific element from NVS.
struct meshx_nvs meshx_nvs_t
meshx_err_t meshx_nvs_remove(char const *key)
Remove a key-value pair from the NVS.
meshx_err_t meshx_nvs_open(uint16_t cid, uint16_t pid, uint32_t commit_timeout_ms)
Open the NVS with a timeout.
meshx_err_t meshx_nvs_set(char const *key, void const *blob, uint16_t blob_size, bool arm_timer)
Set a value in the NVS.
meshx_err_t meshx_nvs_commit(void)
Commit changes to the NVS.
meshx_err_t meshx_nvs_erase(void)
Erase all key-value pairs stored in the NVS.
meshx_err_t meshx_nvs_get(char const *key, void *blob, uint16_t blob_size)
Get a value from the NVS.
Header file for OS timer utilities.
struct meshx_os_timer meshx_os_timer_t
Alias for the meshx_os_timer structure.
Structure to hold the MeshX NVS data.
uintptr_t meshx_nvs_handle
meshx_os_timer_t * meshx_nvs_commit_tmr