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:485
bool eraseNvsKey(const char *key)
Delete the value with the given key from NVS.
Definition hdw-nvs.c:473
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:166
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:585
bool readNvsStats(nvs_stats_t *outStats)
Read info about used memory in NVS.
Definition hdw-nvs.c:554
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:337
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:405
bool writeNvs32(const char *key, int32_t val)
Write a 32 bit value to NVS with a given string key.
Definition hdw-nvs.c:153
bool eraseNvs(void)
Erase and re-initialize the nonvolatile storage.
Definition hdw-nvs.c:101
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:307
bool readNvs32(const char *key, int32_t *outVal)
Read a 32 bit value from NVS with a given string key.
Definition hdw-nvs.c:141
bool deinitNvs(void)
Deinitialize NVS.
Definition hdw-nvs.c:91
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:603
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:320
bool nvsNamespaceInUse(const char *namespace)
Quickly return whether or not any entries exist in a given NVS namespace.
Definition hdw-nvs.c:652
bool initNvs(bool firstTry)
Initialize the nonvolatile storage.
Definition hdw-nvs.c:34
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:234