Function esp_idf_svc::hal::sys::nvs_flash_read_security_cfg
source · pub unsafe extern "C" fn nvs_flash_read_security_cfg(
partition: *const esp_partition_t,
cfg: *mut nvs_sec_cfg_t,
) -> i32
Expand description
@brief Read NVS security configuration from a partition.
@param[in] partition Pointer to partition structure obtained using esp_partition_find_first or esp_partition_get. Must be non-NULL. @param[out] cfg Pointer to nvs security configuration structure. Pointer must be non-NULL.
@note Provided partition is assumed to be marked ‘encrypted’.
@return - ESP_OK, if cfg was read successfully; - ESP_ERR_INVALID_ARG, if partition or cfg is NULL - ESP_ERR_NVS_KEYS_NOT_INITIALIZED, if the partition is not yet written with keys. - ESP_ERR_NVS_CORRUPT_KEY_PART, if the partition containing keys is found to be corrupt - or error codes from esp_partition_read API.