Przeglądaj źródła

Merge branch 'fix/nvs_flash_api_docs' into 'master'

nvs_flash: fix nvs initialization API documentation

See merge request espressif/esp-idf!11621
Ivan Grokhotkov 5 lat temu
rodzic
commit
632a33cef8

+ 2 - 0
components/nvs_flash/include/nvs.h

@@ -137,6 +137,7 @@ typedef struct nvs_opaque_iterator_t *nvs_iterator_t;
  *             - ESP_ERR_NVS_NOT_FOUND id namespace doesn't exist yet and
  *               mode is NVS_READONLY
  *             - ESP_ERR_NVS_INVALID_NAME if namespace name doesn't satisfy constraints
+ *             - ESP_ERR_NO_MEM in case memory could not be allocated for the internal structures
  *             - other error codes from the underlying storage driver
  */
 esp_err_t nvs_open(const char* name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle);
@@ -163,6 +164,7 @@ esp_err_t nvs_open(const char* name, nvs_open_mode_t open_mode, nvs_handle_t *ou
  *             - ESP_ERR_NVS_NOT_FOUND id namespace doesn't exist yet and
  *               mode is NVS_READONLY
  *             - ESP_ERR_NVS_INVALID_NAME if namespace name doesn't satisfy constraints
+ *             - ESP_ERR_NO_MEM in case memory could not be allocated for the internal structures
  *             - other error codes from the underlying storage driver
  */
 esp_err_t nvs_open_from_partition(const char *part_name, const char* name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle);

+ 5 - 0
components/nvs_flash/include/nvs_flash.h

@@ -43,6 +43,7 @@ typedef struct {
  *      - 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
  */
 esp_err_t nvs_flash_init(void);
@@ -57,6 +58,7 @@ esp_err_t nvs_flash_init(void);
  *      - 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 specified partition is not 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
  */
 esp_err_t nvs_flash_init_partition(const char *partition_label);
@@ -71,6 +73,7 @@ esp_err_t nvs_flash_init_partition(const char *partition_label);
  *      - ESP_ERR_NVS_NO_FREE_PAGES if the NVS storage contains no empty pages
  *        (which may happen if NVS partition was truncated)
  *      - ESP_ERR_INVALID_ARG in case partition is NULL
+ *      - 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
  */
 esp_err_t nvs_flash_init_partition_ptr(const esp_partition_t *partition);
@@ -166,6 +169,7 @@ esp_err_t nvs_flash_erase_partition_ptr(const esp_partition_t *partition);
  *      - 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
  */
 esp_err_t nvs_flash_secure_init(nvs_sec_cfg_t* cfg);
@@ -183,6 +187,7 @@ esp_err_t nvs_flash_secure_init(nvs_sec_cfg_t* cfg);
  *      - 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 specified partition is not 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
  */
 esp_err_t nvs_flash_secure_init_partition(const char *partition_label, nvs_sec_cfg_t* cfg);