8#include <esp_ota_ops.h>
12#ifdef USE_OTA_PARTITIONS
14static constexpr size_t PARTITION_TABLE_BUFFER_SIZE = ESP_PARTITION_TABLE_MAX_LEN;
29#ifdef USE_OTA_PARTITIONS
40 PartitionTablePlan &plan);
59 esp_ota_handle_t update_handle_{0};
60 const esp_partition_t *partition_;
61 char expected_bin_md5_[32];
63#ifdef USE_OTA_PARTITIONS
67 uint8_t buf_[PARTITION_TABLE_BUFFER_SIZE];
68 size_t buf_written_{0};
69 size_t image_size_{0};
70 const esp_partition_t *partition_table_part_{
nullptr};
71 const esp_partition_t *bootloader_part_{
nullptr};
bool supports_compression()
OTAResponseTypes setup_bootloader_staging_()
void set_update_md5(const char *md5)
OTAResponseTypes finalize_bootloader_update_(esp_err_t ota_end_err)
OTAResponseTypes begin(size_t image_size, ota::OTAType ota_type=ota::OTA_TYPE_UPDATE_APP)
OTAResponseTypes prepare_bootloader_update_(size_t image_size)
OTAResponseTypes register_and_validate_bootloader_part_()
OTAResponseTypes write(uint8_t *data, size_t len)
OTAResponseTypes validate_new_partition_table_(uint32_t running_app_offset, size_t running_app_size, PartitionTablePlan &plan)
OTAResponseTypes update_partition_table()
bool is_app_or_bootloader_update_() const
OTAResponseTypes register_and_validate_partition_table_part_()
@ OTA_TYPE_UPDATE_BOOTLOADER
void get_running_app_position(uint32_t &offset, size_t &size)
std::unique_ptr< ArduinoLibreTinyOTABackend > make_ota_backend()
const esp_partition_t * copy_dest_part