44#ifndef _NVS_MANAGER_H_
45#define _NVS_MANAGER_H_
58#define NVS_PART_NAME_MAX_SIZE 16
59#define NVS_KEY_NAME_MAX_SIZE 16
60#define NVS_NAMESPACE_NAME "storage"
69bool readNvs32(
const char* key, int32_t* outVal);
73bool readNvsBlob(
const char* key,
void* out_value,
size_t* length);
74bool writeNvsBlob(
const char* key,
const void* value,
size_t length);
75bool readNamespaceNvsBlob(
const char*
namespace,
const char* key,
void* out_value,
size_t* length);
80bool readAllNvsEntryInfos(nvs_stats_t* outStats, nvs_entry_info_t* outEntryInfos,
size_t* numEntryInfos);
82 size_t* numEntryInfos);
bool eraseNamespaceNvsKey(const char *namespace, const char *key)
Delete the value with the given key from NVS.
Definition hdw-nvs.c:487
bool eraseNvsKey(const char *key)
Delete the value with the given key from NVS.
Definition hdw-nvs.c:475
bool readNamespaceNvs32(const char *namespace, const char *key, int32_t *outVal)
Read a 32 bit value from NVS with a given string key.
Definition hdw-nvs.c:168
bool readAllNvsEntryInfos(nvs_stats_t *outStats, nvs_entry_info_t *outEntryInfos, size_t *numEntryInfos)
Read info about each used entry in the default NVS namespace. Typically, this should be called once w...
Definition hdw-nvs.c:587
bool readNvsStats(nvs_stats_t *outStats)
Read info about used memory in NVS.
Definition hdw-nvs.c:556
bool readNamespaceNvsBlob(const char *namespace, const char *key, void *out_value, size_t *length)
Read a blob from NVS with a given string key. Typically, this should be called once with NULL passed ...
Definition hdw-nvs.c:339
bool writeNamespaceNvsBlob(const char *namespace, const char *key, const void *value, size_t length)
Write a blob to NVS with a given string key.
Definition hdw-nvs.c:407
bool writeNvs32(const char *key, int32_t val)
Write a 32 bit value to NVS with a given string key.
Definition hdw-nvs.c:155
bool eraseNvs(void)
Erase and re-initialize the nonvolatile storage.
Definition hdw-nvs.c:103
bool readNvsBlob(const char *key, void *out_value, size_t *length)
Read a blob from NVS with a given string key. Typically, this should be called once with NULL passed ...
Definition hdw-nvs.c:309
bool readNvs32(const char *key, int32_t *outVal)
Read a 32 bit value from NVS with a given string key.
Definition hdw-nvs.c:143
void getNvsKeys(const char *namespace, list_t *list)
Fill a given list_t with all the NVS string keys for the given namespace.
Definition hdw-nvs.c:657
bool deinitNvs(void)
Deinitialize NVS.
Definition hdw-nvs.c:93
bool readNamespaceNvsEntryInfos(const char *namespace, nvs_stats_t *outStats, nvs_entry_info_t *outEntryInfos, size_t *numEntryInfos)
Read info about each used entry in a specific NVS namespace. Typically, this should be called once wi...
Definition hdw-nvs.c:605
bool writeNvsBlob(const char *key, const void *value, size_t length)
Write a blob to NVS with a given string key.
Definition hdw-nvs.c:322
bool nvsNamespaceInUse(const char *namespace)
Quickly return whether or not any entries exist in a given NVS namespace.
Definition hdw-nvs.c:700
bool initNvs(bool firstTry)
Initialize the nonvolatile storage.
Definition hdw-nvs.c:36
bool writeNamespaceNvs32(const char *namespace, const char *key, int32_t val)
Write a 32 bit value to NVS with a given string key.
Definition hdw-nvs.c:236
A doubly linked list with pointers to the first and last nodes.
Definition linked_list.h:87