|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Thin C++ wrappers around the oveRTOS non-volatile storage API. More...
Functions | |
| Result< void > | init () noexcept |
| Initialises the NVS subsystem. | |
| void | deinit () |
| Deinitialises the NVS subsystem and frees associated resources. | |
| Result< size_t > | read (const char *key, void *buf, size_t len) noexcept |
| Reads the value associated with a key from NVS. | |
| Result< void > | write (const char *key, const void *data, size_t len) noexcept |
| Writes a value associated with a key to NVS. | |
| Result< void > | erase (const char *key) noexcept |
| 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.
|
inlinenoexcept |
Initialises the NVS subsystem.
Result<void> on success; unexpected Error on failure.
|
inlinenoexcept |
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. |
unexpected Error (Error::NotFound, …).
|
inlinenoexcept |
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. |
Result<void> on success; unexpected Error on failure.