31#ifndef LIBRISHKA_DRIVERS_NVS_H
32#define LIBRISHKA_DRIVERS_NVS_H
69 static bool erase(
string key,
bool force =
true);
78 static bool set_i8(
string key,
i8 value,
bool force =
true);
87 static bool set_i16(
string key,
i16 value,
bool force =
true);
96 static bool set_i32(
string key,
i32 value,
bool force =
true);
105 static bool set_i64(
string key,
i64 value,
bool force =
true);
114 static bool set_u8(
string key,
u8 value,
bool force =
true);
123 static bool set_u16(
string key,
u16 value,
bool force =
true);
132 static bool set_u32(
string key,
u32 value,
bool force =
true);
141 static bool set_u64(
string key,
u64 value,
bool force =
true);
214 static bool set_string(
string key,
string value,
bool force =
true);
Provides an interface to the non-volatile storage (NVS) in the Rishka system.
Definition: nvs.h:48
static bool erase(string key, bool force=true)
Erases a specific key-value pair from the NVS.
Definition: librishka_drivers_nvs.cpp:29
static u64 get_u64(string key, u64 defvalue)
Retrieves a 64-bit unsigned integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:93
static bool set_u32(string key, u32 value, bool force=true)
Sets a 32-bit unsigned integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:57
static bool set_i64(string key, i64 value, bool force=true)
Sets a 64-bit signed integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:45
static u32 get_u32(string key, u32 defvalue)
Retrieves a 32-bit unsigned integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:89
static bool set_i16(string key, i16 value, bool force=true)
Sets a 16-bit signed integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:37
static bool set_u16(string key, u16 value, bool force=true)
Sets a 16-bit unsigned integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:53
static bool erase_all(bool force=true)
Erases all key-value pairs in the NVS.
Definition: librishka_drivers_nvs.cpp:25
static i64 get_i64(string key, i64 defvalue)
Retrieves a 64-bit signed integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:77
static string get_string(string key)
Retrieves a string value from the NVS.
Definition: librishka_drivers_nvs.cpp:101
static bool set_wifi_ssid(string ssid)
Sets the Wi-Fi SSID in the NVS.
Definition: librishka_drivers_nvs.cpp:109
static i32 get_i32(string key, i32 defvalue)
Retrieves a 32-bit signed integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:73
static bool set_string(string key, string value, bool force=true)
Sets a string value in the NVS.
Definition: librishka_drivers_nvs.cpp:97
static u8 get_u8(string key, u8 defvalue)
Retrieves an 8-bit unsigned integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:81
static bool set_wifi_pword(string pword)
Sets the Wi-Fi password in the NVS.
Definition: librishka_drivers_nvs.cpp:113
static u16 get_u16(string key, u16 defvalue)
Retrieves a 16-bit unsigned integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:85
static bool commit()
Commits the changes to the NVS.
Definition: librishka_drivers_nvs.cpp:21
static bool set_u8(string key, u8 value, bool force=true)
Sets an 8-bit unsigned integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:49
static bool set_i8(string key, i8 value, bool force=true)
Sets an 8-bit signed integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:33
static bool set_u64(string key, u64 value, bool force=true)
Sets a 64-bit unsigned integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:61
static bool has_wifi_config()
Checks if a Wi-Fi configuration is available in the NVS.
Definition: librishka_drivers_nvs.cpp:105
static bool set_i32(string key, i32 value, bool force=true)
Sets a 32-bit signed integer value in the NVS.
Definition: librishka_drivers_nvs.cpp:41
static i8 get_i8(string key, i8 defvalue)
Retrieves an 8-bit signed integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:65
static i16 get_i16(string key, i16 defvalue)
Retrieves a 16-bit signed integer value from the NVS.
Definition: librishka_drivers_nvs.cpp:69
Header file for common data types used in Rishka applications.
signed char i8
Alias for the signed 8-bit integer type.
Definition: types.h:46
signed int i32
Alias for the signed 32-bit integer type.
Definition: types.h:58
unsigned int u32
Alias for the unsigned 32-bit integer type.
Definition: types.h:82
signed short int i16
Alias for the signed 16-bit integer type.
Definition: types.h:52
signed long int i64
Alias for the signed 64-bit integer type.
Definition: types.h:64
unsigned short int u16
Alias for the unsigned 16-bit integer type.
Definition: types.h:76
unsigned char u8
Alias for the unsigned 8-bit integer type.
Definition: types.h:70
unsigned long int u64
Alias for the unsigned 64-bit integer type.
Definition: types.h:88