esp_https_ota: Add definition for esp_https_ota_abort

Update esp_https_ota API to use esp_https_ota_abort in case of error
This commit is contained in:
Shubham Kulkarni
2020-08-14 15:54:15 +05:30
parent d5d722c66f
commit bc78b8f2da
2 changed files with 59 additions and 5 deletions

View File

@@ -135,6 +135,7 @@ bool esp_https_ota_is_complete_data_received(esp_https_ota_handle_t https_ota_ha
*
* @note If this API returns successfully, esp_restart() must be called to
* boot from the new firmware image
* esp_https_ota_finish should not be called after calling esp_https_ota_abort
*
* @param[in] https_ota_handle pointer to esp_https_ota_handle_t structure
*
@@ -147,6 +148,25 @@ bool esp_https_ota_is_complete_data_received(esp_https_ota_handle_t https_ota_ha
esp_err_t esp_https_ota_finish(esp_https_ota_handle_t https_ota_handle);
/**
* @brief Clean-up HTTPS OTA Firmware upgrade and close HTTPS connection
*
* This function closes the HTTP connection and frees the ESP HTTPS OTA context.
*
* @note esp_https_ota_abort should not be called after calling esp_https_ota_finish
*
* @param[in] https_ota_handle pointer to esp_https_ota_handle_t structure
*
* @return
* - ESP_OK: Clean-up successful
* - ESP_ERR_INVALID_STATE: Invalid ESP HTTPS OTA state
* - ESP_FAIL: OTA not started
* - ESP_ERR_NOT_FOUND: OTA handle not found
* - ESP_ERR_INVALID_ARG: Invalid argument
*/
esp_err_t esp_https_ota_abort(esp_https_ota_handle_t https_ota_handle);
/**
* @brief Reads app description from image header. The app description provides information
* like the "Firmware version" of the image.