44#ifndef _NVS_MANAGER_H_
45#define _NVS_MANAGER_H_
57#define NVS_PART_NAME_MAX_SIZE 16
58#define NVS_KEY_NAME_MAX_SIZE 16
59#define NVS_NAMESPACE_NAME "storage"
68bool readNvs32(
const char* key, int32_t* outVal);
72bool readNvsBlob(
const char* key,
void* out_value,
size_t* length);
73bool writeNvsBlob(
const char* key,
const void* value,
size_t length);
74bool readNamespaceNvsBlob(
const char*
namespace,
const char* key,
void* out_value,
size_t* length);
79bool readAllNvsEntryInfos(nvs_stats_t* outStats, nvs_entry_info_t* outEntryInfos,
size_t* numEntryInfos);
81 size_t* numEntryInfos);
bool eraseNamespaceNvsKey(const char *namespace, const char *key)
Delete the value with the given key from NVS.
Definition hdw-nvs.c:477
bool eraseNvsKey(const char *key)
Delete the value with the given key from NVS.
Definition hdw-nvs.c:465
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:158
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:577
bool readNvsStats(nvs_stats_t *outStats)
Read info about used memory in NVS.
Definition hdw-nvs.c:546
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:329
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:397
bool writeNvs32(const char *key, int32_t val)
Write a 32 bit value to NVS with a given string key.
Definition hdw-nvs.c:145
bool eraseNvs(void)
Erase and re-initialize the nonvolatile storage.
Definition hdw-nvs.c:93
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:299
bool readNvs32(const char *key, int32_t *outVal)
Read a 32 bit value from NVS with a given string key.
Definition hdw-nvs.c:133
bool deinitNvs(void)
Deinitialize NVS.
Definition hdw-nvs.c:83
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:595
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:312
bool nvsNamespaceInUse(const char *namespace)
Quickly return whether or not any entries exist in a given NVS namespace.
Definition hdw-nvs.c:644
bool initNvs(bool firstTry)
Initialize the nonvolatile storage.
Definition hdw-nvs.c:26
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:226