![]() |
Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
|
Provides an interface to the non-volatile storage (NVS) in the Rishka system. More...
#include <nvs.h>
Static Public Member Functions | |
| static bool | commit () |
| Commits the changes to the NVS. More... | |
| static bool | erase_all (bool force=true) |
| Erases all key-value pairs in the NVS. More... | |
| static bool | erase (string key, bool force=true) |
| Erases a specific key-value pair from the NVS. More... | |
| static bool | set_i8 (string key, i8 value, bool force=true) |
| Sets an 8-bit signed integer value in the NVS. More... | |
| static bool | set_i16 (string key, i16 value, bool force=true) |
| Sets a 16-bit signed integer value in the NVS. More... | |
| static bool | set_i32 (string key, i32 value, bool force=true) |
| Sets a 32-bit signed integer value in the NVS. More... | |
| static bool | set_i64 (string key, i64 value, bool force=true) |
| Sets a 64-bit signed integer value in the NVS. More... | |
| static bool | set_u8 (string key, u8 value, bool force=true) |
| Sets an 8-bit unsigned integer value in the NVS. More... | |
| static bool | set_u16 (string key, u16 value, bool force=true) |
| Sets a 16-bit unsigned integer value in the NVS. More... | |
| static bool | set_u32 (string key, u32 value, bool force=true) |
| Sets a 32-bit unsigned integer value in the NVS. More... | |
| static bool | set_u64 (string key, u64 value, bool force=true) |
| Sets a 64-bit unsigned integer value in the NVS. More... | |
| static i8 | get_i8 (string key, i8 defvalue) |
| Retrieves an 8-bit signed integer value from the NVS. More... | |
| static i16 | get_i16 (string key, i16 defvalue) |
| Retrieves a 16-bit signed integer value from the NVS. More... | |
| static i32 | get_i32 (string key, i32 defvalue) |
| Retrieves a 32-bit signed integer value from the NVS. More... | |
| static i64 | get_i64 (string key, i64 defvalue) |
| Retrieves a 64-bit signed integer value from the NVS. More... | |
| static u8 | get_u8 (string key, u8 defvalue) |
| Retrieves an 8-bit unsigned integer value from the NVS. More... | |
| static u16 | get_u16 (string key, u16 defvalue) |
| Retrieves a 16-bit unsigned integer value from the NVS. More... | |
| static u32 | get_u32 (string key, u32 defvalue) |
| Retrieves a 32-bit unsigned integer value from the NVS. More... | |
| static u64 | get_u64 (string key, u64 defvalue) |
| Retrieves a 64-bit unsigned integer value from the NVS. More... | |
| static bool | set_string (string key, string value, bool force=true) |
| Sets a string value in the NVS. More... | |
| static string | get_string (string key) |
| Retrieves a string value from the NVS. More... | |
| static bool | has_wifi_config () |
| Checks if a Wi-Fi configuration is available in the NVS. More... | |
| static bool | set_wifi_ssid (string ssid) |
| Sets the Wi-Fi SSID in the NVS. More... | |
| static bool | set_wifi_pword (string pword) |
| Sets the Wi-Fi password in the NVS. More... | |
Provides an interface to the non-volatile storage (NVS) in the Rishka system.
The NVS class offers a variety of static methods to handle persistent storage of key-value pairs. It supports storing and retrieving different types of data, including integers, unsigned integers, and strings. Additionally, it provides methods to manage Wi-Fi configuration data.
|
static |
Commits the changes to the NVS.
Erases a specific key-value pair from the NVS.
| key | The key to be erased. |
| force | If true, forces the erase operation. |
|
static |
Erases all key-value pairs in the NVS.
| force | If true, forces the erase operation. |
Retrieves a 16-bit signed integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves a 32-bit signed integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves a 64-bit signed integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves an 8-bit signed integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves a string value from the NVS.
| key | The key associated with the value. |
Retrieves a 16-bit unsigned integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves a 32-bit unsigned integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves a 64-bit unsigned integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
Retrieves an 8-bit unsigned integer value from the NVS.
| key | The key associated with the value. |
| defvalue | The default value if the key is not found. |
|
static |
Checks if a Wi-Fi configuration is available in the NVS.
Sets a 16-bit signed integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets a 32-bit signed integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets a 64-bit signed integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets an 8-bit signed integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets a string value in the NVS.
| key | The key associated with the value. |
| value | The string to be stored. |
| force | If true, forces the set operation. |
Sets a 16-bit unsigned integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets a 32-bit unsigned integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets a 64-bit unsigned integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
Sets an 8-bit unsigned integer value in the NVS.
| key | The key associated with the value. |
| value | The value to be stored. |
| force | If true, forces the set operation. |
|
static |
Sets the Wi-Fi password in the NVS.
| pword | The password to be stored. |
|
static |
Sets the Wi-Fi SSID in the NVS.
| ssid | The SSID to be stored. |