refactor (nvs)!: New interface for iterator functions

Closes https://github.com/espressif/esp-idf/issues/7826

* nvs_entry_find(), nvs_entry_next() and nvs_entry_info()
  return error codes now
* nvs_entry_find() and nvs_entry_next() access/modify iterator via
  parameters, instead of returning an new iterator.

Added appropriate documentation in Chinese and English
This commit is contained in:
Jakob Hasse
2022-05-11 18:49:55 +08:00
parent 769bc9b2d2
commit ad184e979a
9 changed files with 322 additions and 131 deletions

View File

@@ -132,8 +132,9 @@ static const esp_err_msg_t esp_err_msg_table[] = {
ERR_TBL_IT(ESP_ERR_NVS_NOT_INITIALIZED), /* 4353 0x1101 The storage driver is not initialized */
# endif
# ifdef ESP_ERR_NVS_NOT_FOUND
ERR_TBL_IT(ESP_ERR_NVS_NOT_FOUND), /* 4354 0x1102 Id namespace doesnt exist yet and mode
is NVS_READONLY */
ERR_TBL_IT(ESP_ERR_NVS_NOT_FOUND), /* 4354 0x1102 A requested entry couldn't be found or
namespace doesnt exist yet and mode is
NVS_READONLY */
# endif
# ifdef ESP_ERR_NVS_TYPE_MISMATCH
ERR_TBL_IT(ESP_ERR_NVS_TYPE_MISMATCH), /* 4355 0x1103 The type of set or get operation doesn't