EasyManua.ls Logo

Espressif ESP32-S2 - Page 726

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Structures
struct nvs_sec_cfg_t
Key for encryption and decryption.
Public Members
uint8_t eky[NVS_KEY_SIZE]
XTS encryption and decryption key
uint8_t tky[NVS_KEY_SIZE]
XTS tweak key
Macros
NVS_KEY_SIZE
Header File
components/nvs_flash/include/nvs.h
Functions
esp_err_t nvs_set_i8(nvs_handle_t handle, const char *key, int8_t value)
set int8_t value for given key
Set value for the key, given its name. Note that the actual storage will not be updated until nvs_commit is
called.
Return
ESP_OK if value was set successfully
ESP_ERR_NVS_INVALID_HANDLE if handle has been closed or is NULL
ESP_ERR_NVS_READ_ONLY if storage handle was opened as read only
ESP_ERR_NVS_INVALID_NAME if key name doesnt satisfy constraints
ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is not enough space in the underlying storage
to save the value
ESP_ERR_NVS_REMOVE_FAILED if the value wasnt updated because flash write operation
has failed. The value was written however, and update will be finished after re-initialization of nvs,
provided that flash operation doesnt fail again.
Parameters
[in] handle: Handle obtained from nvs_open function. Handles that were opened read only
cannot be used.
[in] key: Key name. Maximal length is (NVS_KEY_NAME_MAX_SIZE-1) characters.
Shouldnt be empty.
[in] value: The value to set.
esp_err_t nvs_set_u8(nvs_handle_t handle, const char *key, uint8_t value)
set uint8_t value for given key
This function is the same as nvs_set_i8 except for the data type.
esp_err_t nvs_set_i16(nvs_handle_t handle, const char *key, int16_t value)
set int16_t value for given key
This function is the same as nvs_set_i8 except for the data type.
esp_err_t nvs_set_u16(nvs_handle_t handle, const char *key, uint16_t value)
set uint16_t value for given key
This function is the same as nvs_set_i8 except for the data type.
esp_err_t nvs_set_i32(nvs_handle_t handle, const char *key, int32_t value)
set int32_t value for given key
This function is the same as nvs_set_i8 except for the data type.
Espressif Systems 715
Submit Document Feedback
Release v4.4

Table of Contents