ESPHome
2026.5.0-dev
Loading...
Searching...
No Matches
esphome
components
ota
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
5
#include "
esphome/components/md5/md5.h
"
6
#include "
esphome/core/defines.h
"
7
8
#include <esp_ota_ops.h>
9
10
namespace
esphome::ota
{
11
12
class
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
);
17
OTAResponseTypes
end
();
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
29
std::unique_ptr<IDFOTABackend>
make_ota_backend
();
30
31
}
// namespace esphome::ota
32
#endif
// USE_ESP32
esphome::md5::MD5Digest
Definition
md5.h:35
esphome::ota::IDFOTABackend
Definition
ota_backend_esp_idf.h:12
esphome::ota::IDFOTABackend::abort
void abort()
Definition
ota_backend_esp_idf.cpp:117
esphome::ota::IDFOTABackend::supports_compression
bool supports_compression()
Definition
ota_backend_esp_idf.h:19
esphome::ota::IDFOTABackend::end
OTAResponseTypes end()
Definition
ota_backend_esp_idf.cpp:87
esphome::ota::IDFOTABackend::set_update_md5
void set_update_md5(const char *md5)
Definition
ota_backend_esp_idf.cpp:68
esphome::ota::IDFOTABackend::write
OTAResponseTypes write(uint8_t *data, size_t len)
Definition
ota_backend_esp_idf.cpp:73
esphome::ota::IDFOTABackend::begin
OTAResponseTypes begin(size_t image_size)
Definition
ota_backend_esp_idf.cpp:18
defines.h
md5.h
esphome::ota
Definition
automation.h:7
esphome::ota::OTAResponseTypes
OTAResponseTypes
Definition
ota_backend.h:13
esphome::ota::make_ota_backend
std::unique_ptr< ArduinoLibreTinyOTABackend > make_ota_backend()
Definition
ota_backend_arduino_libretiny.cpp:14
esphome::len
std::string size_t len
Definition
helpers.h:1045
ota_backend.h
Generated by
1.12.0