mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
esp_https_ota: Added error checking functionalities.
Current implimentation of esp_http_ota does not perform any error-checking in the data writing phase calls `esp_ota_get_next_update_partition()` irrespetive of the received state of the image. A few additional error checking mechanism have now been added inside the esp_https_ota which returns the control in case an invalid header is received and a wrapper to the function `esp_http_client_is_complete_data_received()` of `esp_http_client` has been added.
This commit is contained in:

committed by
Mahavir Jain

parent
5863509804
commit
53e7beb95b
@@ -110,6 +110,19 @@ esp_err_t esp_https_ota_begin(esp_https_ota_config_t *ota_config, esp_https_ota_
|
||||
*/
|
||||
esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle);
|
||||
|
||||
/**
|
||||
* @brief Checks if complete data was received or not
|
||||
*
|
||||
* @note This API can be called just before esp_https_ota_finish() to validate if the complete image was indeed received.
|
||||
*
|
||||
* @param[in] https_ota_handle pointer to esp_https_ota_handle_t structure
|
||||
*
|
||||
* @return
|
||||
* - false
|
||||
* - true
|
||||
*/
|
||||
bool esp_https_ota_is_complete_data_received(esp_https_ota_handle_t https_ota_handle);
|
||||
|
||||
/**
|
||||
* @brief Clean-up HTTPS OTA Firmware upgrade and close HTTPS connection
|
||||
*
|
||||
|
Reference in New Issue
Block a user