ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
ota_backend_esp_idf.h
Go to the documentation of this file.
1#pragma once
2#ifdef USE_ESP32
3#include "ota_backend.h"
4
7
8#include <esp_ota_ops.h>
9
10namespace esphome::ota {
11
12class IDFOTABackend final {
13 public:
14 OTAResponseTypes begin(size_t image_size);
15 void set_update_md5(const char *md5);
16 OTAResponseTypes write(uint8_t *data, size_t len);
18 void abort();
19 bool supports_compression() { return false; }
20
21 private:
22 esp_ota_handle_t update_handle_{0};
23 const esp_partition_t *partition_;
24 md5::MD5Digest md5_{};
25 char expected_bin_md5_[32];
26 bool md5_set_{false};
27};
28
29std::unique_ptr<IDFOTABackend> make_ota_backend();
30
31} // namespace esphome::ota
32#endif // USE_ESP32
void set_update_md5(const char *md5)
OTAResponseTypes write(uint8_t *data, size_t len)
OTAResponseTypes begin(size_t image_size)
std::unique_ptr< ArduinoLibreTinyOTABackend > make_ota_backend()
std::string size_t len
Definition helpers.h:1045