From 6154f22ab385f335ad00f3cfaabfa3661b61cc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20M=C3=BAdry?= Date: Thu, 19 Oct 2023 14:36:10 +0200 Subject: [PATCH] docs: nvs_open* add ESP_ERR_INVALID_ARG to return description ESP_ERR_INVALID_ARG is returned from underlying functions but this was not easily evident --- components/nvs_flash/include/nvs.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/nvs_flash/include/nvs.h b/components/nvs_flash/include/nvs.h index 2384680fee..362404e937 100644 --- a/components/nvs_flash/include/nvs.h +++ b/components/nvs_flash/include/nvs.h @@ -136,6 +136,7 @@ typedef struct nvs_opaque_iterator_t *nvs_iterator_t; * - ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is no space for a new entry or there are too many different * namespaces (maximum allowed different namespaces: 254) * - ESP_ERR_NOT_ALLOWED if the NVS partition is read-only and mode is NVS_READWRITE + * - ESP_ERR_INVALID_ARG if out_handle is equal to NULL * - other error codes from the underlying storage driver */ esp_err_t nvs_open(const char* namespace_name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle); @@ -168,6 +169,7 @@ esp_err_t nvs_open(const char* namespace_name, nvs_open_mode_t open_mode, nvs_ha * - ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is no space for a new entry or there are too many different * namespaces (maximum allowed different namespaces: 254) * - ESP_ERR_NOT_ALLOWED if the NVS partition is read-only and mode is NVS_READWRITE + * - ESP_ERR_INVALID_ARG if out_handle is equal to NULL * - other error codes from the underlying storage driver */ esp_err_t nvs_open_from_partition(const char *part_name, const char* namespace_name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle); @@ -587,7 +589,7 @@ typedef struct { * Return param nvs_stats will be filled 0. * - ESP_ERR_NVS_NOT_INITIALIZED if the storage driver is not initialized. * Return param nvs_stats will be filled 0. - * - ESP_ERR_INVALID_ARG if nvs_stats equal to NULL. + * - ESP_ERR_INVALID_ARG if nvs_stats is equal to NULL. * - ESP_ERR_INVALID_STATE if there is page with the status of INVALID. * Return param nvs_stats will be filled not with correct values because * not all pages will be counted. Counting will be interrupted at the first INVALID page. @@ -628,7 +630,7 @@ esp_err_t nvs_get_stats(const char *part_name, nvs_stats_t *nvs_stats); * Return param used_entries will be filled 0. * - ESP_ERR_NVS_INVALID_HANDLE if handle has been closed or is NULL. * Return param used_entries will be filled 0. - * - ESP_ERR_INVALID_ARG if used_entries equal to NULL. + * - ESP_ERR_INVALID_ARG if used_entries is equal to NULL. * - Other error codes from the underlying storage driver. * Return param used_entries will be filled 0. */