esp_https_ota: Added support for esp_events

This commit is contained in:
Harshit Malpani
2022-11-02 11:05:19 +05:30
parent e6c57c0d14
commit 784089bf09
4 changed files with 95 additions and 1 deletions

View File

@@ -10,11 +10,28 @@
#include <bootloader_common.h>
#include "esp_app_desc.h"
#include <sdkconfig.h>
#include "esp_event.h"
#ifdef __cplusplus
extern "C" {
#endif
ESP_EVENT_DECLARE_BASE(ESP_HTTPS_OTA_EVENT);
/**
* @brief Events generated by OTA process
*/
typedef enum {
ESP_HTTPS_OTA_START,
ESP_HTTPS_OTA_CONNECTED,
ESP_HTTPS_OTA_GET_IMG_DESC,
ESP_HTTPS_OTA_VERIFY_CHIP_ID,
ESP_HTTPS_OTA_DECRYPT_CB,
ESP_HTTPS_OTA_WRITE_FLASH,
ESP_HTTPS_OTA_UPDATE_BOOT_PARTITION,
ESP_HTTPS_OTA_FINISH,
ESP_HTTPS_OTA_ABORT,
} esp_https_ota_event_t;
typedef void *esp_https_ota_handle_t;
typedef esp_err_t(*http_client_init_cb_t)(esp_http_client_handle_t);