12#ifndef __MESHX_NVS_H__
13#define __MESHX_NVS_H__
24#define MESHX_NVS_TIMER_PERIOD_DEF 1000
26#ifndef MESHX_NVS_TIMER_PERIOD
27#define MESHX_NVS_TIMER_PERIOD MESHX_NVS_TIMER_PERIOD_DEF
30#define MESHX_NVS_AUTO_COMMIT true
31#define MESHX_NVS_NO_AUTO_COMMIT false
42#ifdef MESHX_NVS_TIMER_PERIOD
Common application definitions and includes for BLE Mesh Node.
Header file for the control task in the BLE mesh node application.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
meshx_err_t meshx_nvs_init(void)
MeshX NVS Initialisation.
Definition meshx_nvs.c:142
meshx_err_t meshx_nvs_close(void)
Close the NVS handle.
Definition meshx_nvs.c:319
meshx_err_t meshx_nvs_element_ctx_get(uint16_t element_id, meshx_element_type_t element_type, void *blob, size_t blob_size)
Retrieve the context of a specific element from NVS.
Definition meshx_nvs.c:447
struct meshx_nvs meshx_nvs_t
meshx_err_t meshx_nvs_remove(char const *key)
Remove a key-value pair from the NVS.
Definition meshx_nvs.c:348
meshx_err_t meshx_nvs_open(uint16_t cid, uint16_t pid, uint32_t commit_timeout_ms)
Open the NVS with a timeout.
Definition meshx_nvs.c:180
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.
Definition meshx_nvs.c:388
meshx_err_t meshx_nvs_element_ctx_set(uint16_t element_id, meshx_element_type_t element_type, const void *blob, size_t blob_size)
Store the context of a specific element to NVS.
Definition meshx_nvs.c:466
meshx_err_t meshx_nvs_commit(void)
Commit changes to the NVS.
Definition meshx_nvs.c:277
meshx_err_t meshx_nvs_erase(void)
Erase all key-value pairs stored in the NVS.
Definition meshx_nvs.c:261
meshx_err_t meshx_nvs_get(char const *key, void *blob, uint16_t blob_size)
Get a value from the NVS.
Definition meshx_nvs.c:368
meshx_err_t meshx_nvs_element_ctx_remove(uint16_t element_id, meshx_element_type_t element_type)
Remove the context of a specific element from NVS.
Definition meshx_nvs.c:482
Header file for OS timer utilities.
struct meshx_os_timer meshx_os_timer_t
Alias for the meshx_os_timer structure.
Definition meshx_os_timer.h:47
Structure to hold the MeshX NVS data.
Definition meshx_nvs.h:37
uintptr_t meshx_nvs_handle
Definition meshx_nvs.h:41
uint16_t pid
Definition meshx_nvs.h:40
uint16_t init
Definition meshx_nvs.h:38
meshx_os_timer_t * meshx_nvs_commit_tmr
Definition meshx_nvs.h:43
uint16_t cid
Definition meshx_nvs.h:39