|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Thin C++ wrappers around the oveRTOS non-volatile storage API. More...
Functions | |
| int | init () |
| Initialises the NVS subsystem. | |
| void | deinit () |
| Deinitialises the NVS subsystem and frees associated resources. | |
| int | read (const char *key, void *buf, size_t len, size_t *out) |
| Reads the value associated with a key from NVS. | |
| int | write (const char *key, const void *data, size_t len) |
| Writes a value associated with a key to NVS. | |
| int | erase (const char *key) |
| Erases the value associated with a key from NVS. | |
Thin C++ wrappers around the oveRTOS non-volatile storage API.
Available when CONFIG_OVE_NVS is enabled. Keys are null-terminated strings; values are arbitrary byte buffers.
|
inline |
Initialises the NVS subsystem.
OVE_OK on success, or a negative error code.
|
inline |
Reads the value associated with a key from NVS.
| [in] | key | The null-terminated key string. |
| [out] | buf | Buffer to receive the stored value. |
| [in] | len | Size of buf in bytes. |
| [out] | out | Receives the number of bytes actually read. |
OVE_OK on success, or a negative error code.
|
inline |
Writes a value associated with a key to NVS.
| [in] | key | The null-terminated key string. |
| [in] | data | Pointer to the data to store. |
| [in] | len | Number of bytes to write. |
OVE_OK on success, or a negative error code.
|
inline |
Erases the value associated with a key from NVS.
| [in] | key | The null-terminated key string. |
OVE_OK on success, or a negative error code.