Function esp_idf_svc::hal::sys::nvs_flash_secure_init
source · pub unsafe extern "C" fn nvs_flash_secure_init(
cfg: *mut nvs_sec_cfg_t,
) -> i32
Expand description
@brief Initialize 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.
@param[in] cfg Security configuration (keys) to be used for NVS encryption/decryption. If cfg is NULL, no encryption is used.
@return - ESP_OK if storage has been initialized successfully. - ESP_ERR_NVS_NO_FREE_PAGES if the NVS storage contains no empty pages (which may happen if NVS partition was truncated) - ESP_ERR_NOT_FOUND if no partition with label “nvs” is found in the partition table - ESP_ERR_NO_MEM in case memory could not be allocated for the internal structures - one of the error codes from the underlying flash storage driver