nvs_bootloader_read() function
Reads data specified from the specified NVS partition. This function reads data from the NVS partition specified by `partition_name`. Multiple NVS entries can be read in a single call. The list of entries to read is specified in the `read_list` array. Function indicates overall success or failure by its return value. In case it is ESP_OK or ESP_ERR_INVALID_ARG, result of validation / reading of individual entry is returned in the `result_code` member of each element of the `read_list` array.
Arguments
partition_name
The name of the NVS partition to read from.
read_list_count
The number of elements in the `read_list` array.
read_list
An array of `nvs_bootloader_read_list_t` structures specifying the keys and buffers for reading data.
Return value
The return value of the function in this file can be one of the following: - `ESP_OK`: The function successfully checked all input parameters and executed successfully. The individual `result_code` in `read_list` indicates the result of the lookup for a particular requested key. - `ESP_ERR_INVALID_ARG`: The validity of all `read_list` input parameters was checked and failed for at least one of the parameters. The individual `result_code` in `read_list` provides the detailed reason. This error code is also returned when read_list is null or read_list_count is 0. - `ESP_ERR_NVS_INVALID_NAME`: The partition name specified is too long or is null. - `ESP_ERR_NVS_PART_NOT_FOUND`: The partition was not found in the partition table. - `ESP_ERR_NVS_CORRUPT_KEY_PART`: Encryption-related problems. - `ESP_ERR_NVS_WRONG_ENCRYPTION`: Encryption-related problems. - `ESP_ERR_INVALID_STATE`: NVS partition or pages related errors - wrong size of partition, header inconsistent / entries inconsistencies, multiple active pages, page in state INVALID. - `ESP_ERR_NO_MEM`: Cannot allocate memory required to perform the function. - Technical errors in underlying storage.