change(nvs_flash): nvs_get_stats extended, API documentation improved

This commit is contained in:
radek.tandler
2023-06-02 21:36:01 +02:00
parent 31d87a0c59
commit ac6c03fad1
6 changed files with 133 additions and 67 deletions
+6 -5
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -524,10 +524,11 @@ extern "C" esp_err_t nvs_get_stats(const char* part_name, nvs_stats_t* nvs_stats
if (nvs_stats == nullptr) {
return ESP_ERR_INVALID_ARG;
}
nvs_stats->used_entries = 0;
nvs_stats->free_entries = 0;
nvs_stats->total_entries = 0;
nvs_stats->namespace_count = 0;
nvs_stats->used_entries = 0;
nvs_stats->free_entries = 0;
nvs_stats->total_entries = 0;
nvs_stats->available_entries = 0;
nvs_stats->namespace_count = 0;
pStorage = lookup_storage_from_name((part_name == nullptr) ? NVS_DEFAULT_PART_NAME : part_name);
if (pStorage == nullptr) {