ESPHome  2024.10.2
ota_backend_esp_idf.h
Go to the documentation of this file.
1 #pragma once
2 #ifdef USE_ESP_IDF
3 #include "ota_backend.h"
4 
6 #include "esphome/core/defines.h"
7 
8 #include <esp_ota_ops.h>
9 
10 namespace esphome {
11 namespace ota {
12 
13 class IDFOTABackend : public OTABackend {
14  public:
15  OTAResponseTypes begin(size_t image_size) override;
16  void set_update_md5(const char *md5) override;
17  OTAResponseTypes write(uint8_t *data, size_t len) override;
18  OTAResponseTypes end() override;
19  void abort() override;
20  bool supports_compression() override { return false; }
21 
22  private:
23  esp_ota_handle_t update_handle_{0};
24  const esp_partition_t *partition_;
25  md5::MD5Digest md5_{};
26  char expected_bin_md5_[32];
27 };
28 
29 } // namespace ota
30 } // namespace esphome
31 #endif
OTAResponseTypes begin(size_t image_size) override
std::string size_t len
Definition: helpers.h:292
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
OTAResponseTypes write(uint8_t *data, size_t len) override
void set_update_md5(const char *md5) override
OTAResponseTypes end() override