|
|
@@ -50,8 +50,7 @@ esp_err_t nvs_flash_init(void);
|
|
|
/**
|
|
|
* @brief Initialize NVS flash storage for the specified partition.
|
|
|
*
|
|
|
- * @param[in] partition_label Label of the partition. Note that internally a reference to
|
|
|
- * passed value is kept and it should be accessible for future operations
|
|
|
+ * @param[in] partition_label Label of the partition. Must be no longer than 16 characters.
|
|
|
*
|
|
|
* @return
|
|
|
* - ESP_OK if storage was successfully initialized.
|
|
|
@@ -118,8 +117,8 @@ esp_err_t nvs_flash_erase_partition(const char *part_name);
|
|
|
* 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.
|
|
|
+ * @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 was successfully initialized.
|
|
|
@@ -136,8 +135,8 @@ esp_err_t nvs_flash_secure_init(nvs_sec_cfg_t* cfg);
|
|
|
* @param[in] partition_label Label of the partition. Note that internally a reference to
|
|
|
* passed value is kept and it should be accessible for future operations
|
|
|
*
|
|
|
- * @param[in] cfg Security configuration (keys) to be used for NVS encryption/decryption.
|
|
|
- * If cfg is null, no encryption/decryption is used.
|
|
|
+ * @param[in] cfg Security configuration (keys) to be used for NVS encryption/decryption.
|
|
|
+ * If cfg is null, no encryption/decryption is used.
|
|
|
* @return
|
|
|
* - ESP_OK if storage was successfully initialized.
|
|
|
* - ESP_ERR_NVS_NO_FREE_PAGES if the NVS storage contains no empty pages
|
|
|
@@ -149,16 +148,16 @@ esp_err_t nvs_flash_secure_init_partition(const char *partition_label, nvs_sec_c
|
|
|
|
|
|
/**
|
|
|
* @brief Generate and store NVS keys in the provided esp 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.
|
|
|
+ * Pointer must be non-NULL.
|
|
|
* Generated keys will be populated in this structure.
|
|
|
*
|
|
|
*
|
|
|
- * @return
|
|
|
+ * @return
|
|
|
* -ESP_OK, if cfg was read successfully;
|
|
|
* -or error codes from esp_partition_write/erase APIs.
|
|
|
*/
|
|
|
@@ -167,8 +166,8 @@ esp_err_t nvs_flash_generate_keys(const esp_partition_t* partition, nvs_sec_cfg_
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @brief Read NVS security configuration from a partition.
|
|
|
- *
|
|
|
+ * @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.
|
|
|
@@ -177,7 +176,7 @@ esp_err_t nvs_flash_generate_keys(const esp_partition_t* partition, nvs_sec_cfg_
|
|
|
*
|
|
|
* @note Provided parition is assumed to be marked 'encrypted'.
|
|
|
*
|
|
|
- * @return
|
|
|
+ * @return
|
|
|
* -ESP_OK, if cfg was read successfully;
|
|
|
* -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
|