|
25 | 25 | extern "C" { |
26 | 26 | #endif |
27 | 27 |
|
| 28 | +#include <esp_idf_version.h> |
| 29 | + |
28 | 30 | #include "edgehog_device.h" |
29 | 31 | #include "edgehog_telemetry.h" |
30 | 32 | #if CONFIG_INDICATOR_GPIO_ENABLE |
@@ -71,13 +73,19 @@ esp_err_t edgehog_device_nvs_open( |
71 | 73 | * @param edgehog_device A valid Edgehog device handle. |
72 | 74 | * @param namespace Namespace name. |
73 | 75 | * @param type One of nvs_type_t values. |
| 76 | + * @param it Iterator used to enumerate all the entries found,or NULL if no entry satisfying |
| 77 | + * criteria was found. Iterator obtained through this function has to be released using |
| 78 | + * nvs_release_iterator when not used any more. |
74 | 79 | * |
75 | | - * @return Iterator used to enumerate all the entries found,or NULL if no entry satisfying criteria |
76 | | - * was found. Iterator obtained through this function has to be released using nvs_release_iterator |
77 | | - * when not used any more. |
| 80 | + * @return ESP_OK if iterator was created successfully, an esp_err_t otherwise. |
78 | 81 | */ |
| 82 | +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) |
| 83 | +esp_err_t edgehog_device_nvs_entry_find(edgehog_device_handle_t edgehog_device, |
| 84 | + const char *namespace, nvs_type_t type, nvs_iterator_t *it); |
| 85 | +#else |
79 | 86 | nvs_iterator_t edgehog_device_nvs_entry_find( |
80 | 87 | edgehog_device_handle_t edgehog_device, const char *namespace, nvs_type_t type); |
| 88 | +#endif |
81 | 89 |
|
82 | 90 | /** |
83 | 91 | * @brief Telemetry periodic callback type. |
|
0 commit comments