|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
#include <idfxx_nvs/include/idfxx/nvs.hpp>
Classes | |
| struct | insecure_t |
| Tag type to indicate insecure (non-encrypted) initialization. More... | |
| struct | secure_config |
| Key for encryption and decryption. More... | |
Public Member Functions | |
| flash ()=delete | |
Static Public Member Functions | |
| static void | init () |
| Initializes the default NVS partition. | |
| static void | init (const secure_config &cfg) |
| Initialize the default NVS partition with encryption. | |
| static void | init (insecure_t) |
| Initialize the default NVS partition without encryption. | |
| static void | init (std::string_view partition_label) |
| Initialize NVS flash storage for the specified partition. | |
| static void | init (std::string_view partition_label, const secure_config &cfg) |
| Initialize NVS flash storage for the specified partition. | |
| static void | init (insecure_t, std::string_view partition_label) |
| Initialize NVS flash storage for the specified partition without encryption. | |
| static result< void > | try_init () |
| Initializes the default NVS partition. | |
| static result< void > | try_init (const secure_config &cfg) |
| Initialize the default NVS partition with encryption. | |
| static result< void > | try_init (insecure_t) |
| Initialize the default NVS partition without encryption. | |
| static result< void > | try_init (std::string_view partition_label) |
| Initialize NVS flash storage for the specified partition. | |
| static result< void > | try_init (std::string_view partition_label, const secure_config &cfg) |
| Initialize NVS flash storage for the specified partition. | |
| static result< void > | try_init (insecure_t, std::string_view partition_label) |
| Initialize NVS flash storage for the specified partition without encryption. | |
| static void | deinit () |
| Deinitialize NVS storage for the default NVS partition. | |
| static void | deinit (std::string_view partition_label) |
| Deinitialize NVS storage for the specified partition. | |
| static result< void > | try_deinit () |
| Deinitialize NVS storage for the default NVS partition. | |
| static result< void > | try_deinit (std::string_view partition_label) |
| Deinitialize NVS storage for the specified partition. | |
| static void | erase () |
| Erases the default NVS partition. | |
| static void | erase (std::string_view partition_label) |
| Erase specified NVS partition. | |
| static result< void > | try_erase () |
| Erases the default NVS partition. | |
| static result< void > | try_erase (std::string_view partition_label) |
| Erases the specified NVS partition. | |
Static Public Attributes | |
| static constexpr size_t | key_size = 32 |
| static constexpr insecure_t | insecure {} |
| Insecure (non-encrypted) initialization tag. | |
|
delete |
|
inlinestatic |
Deinitialize NVS storage for the default NVS partition.
| std::system_error | on failure. |
Definition at line 556 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Deinitialize NVS storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| std::system_error | on failure. |
Definition at line 566 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Erases the default NVS partition.
| std::system_error | on failure. |
Definition at line 592 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Erase specified NVS partition.
| partition_label | Label of the partition which should be erased |
| std::system_error | on failure. |
Definition at line 602 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initializes the default NVS partition.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
When "NVS_ENCRYPTION" is enabled in the menuconfig, this API enables the NVS encryption for the default NVS partition as follows
Post initialization NVS read/write APIs remain the same irrespective of NVS encryption.
| std::system_error | on failure. |
Definition at line 388 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initialize the default NVS partition with encryption.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
| cfg | Security configuration (keys) to be used for NVS encryption/decryption. |
| std::system_error | on failure. |
Definition at line 401 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initialize the default NVS partition without encryption.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
| std::system_error | on failure. |
Definition at line 412 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initialize NVS flash storage for the specified partition without encryption.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| std::system_error | on failure. |
Definition at line 445 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initialize NVS flash storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| std::system_error | on failure. |
Definition at line 422 of file nvs.hpp.
References idfxx::unwrap().
|
inlinestatic |
Initialize NVS flash storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| cfg | Security configuration (keys) to be used for NVS encryption/decryption |
| std::system_error | on failure. |
Definition at line 433 of file nvs.hpp.
References idfxx::unwrap().
|
static |
Deinitialize NVS storage for the default NVS partition.
| nvs::errc::not_initialized | if the storage was not initialized prior to this call. |
|
static |
Deinitialize NVS storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| nvs::errc::not_initialized | if the storage was not initialized prior to this call. |
|
static |
Erases the default NVS partition.
| nvs::errc::not_found | if there is no NVS partition labeled "nvs" in the partition table. |
|
static |
Erases the specified NVS partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| nvs::errc::not_found | if specified partition is not found in the partition table. |
|
static |
Initializes the default NVS partition.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
When "NVS_ENCRYPTION" is enabled in the menuconfig, this API enables the NVS encryption for the default NVS partition as follows
Post initialization NVS read/write APIs remain the same irrespective of NVS encryption.
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::part_not_found | if no partition with label "nvs" is found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
static |
Initialize the default NVS partition with encryption.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
| cfg | Security configuration (keys) to be used for NVS encryption/decryption. |
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::part_not_found | if no partition with label "nvs" is found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
static |
Initialize the default NVS partition without encryption.
This API initialises the default NVS partition. The default NVS partition is the one that is labeled "nvs" in the partition table.
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::part_not_found | if no partition with label "nvs" is found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
static |
Initialize NVS flash storage for the specified partition without encryption.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::not_found | if specified partition is not found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
static |
Initialize NVS flash storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::not_found | if specified partition is not found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
static |
Initialize NVS flash storage for the specified partition.
| partition_label | Label of the partition. Must be no longer than 16 characters. |
| cfg | Security configuration (keys) to be used for NVS encryption/decryption. |
| nvs::errc::no_free_pages | if the NVS storage contains no empty pages (which may happen if NVS partition was truncated). |
| nvs::errc::not_found | if specified partition is not found in the partition table. |
| nvs::errc::no_mem | in case memory could not be allocated for the internal structures. |
| Other | error codes from the underlying flash storage driver. |
|
staticconstexpr |
|
staticconstexpr |