ESPHome
2026.1.3
Loading...
Searching...
No Matches
esphome
components
ota
ota_backend_host.cpp
Go to the documentation of this file.
1
#ifdef USE_HOST
2
#include "
ota_backend_host.h
"
3
4
#include "
esphome/core/defines.h
"
5
6
namespace
esphome::ota
{
7
8
// Stub implementation - OTA is not supported on host platform.
9
// All methods return error codes to allow compilation of configs with OTA triggers.
10
11
std::unique_ptr<ota::OTABackend>
make_ota_backend
() {
return
make_unique<ota::HostOTABackend>(); }
12
13
OTAResponseTypes
HostOTABackend::begin
(
size_t
image_size) {
return
OTA_RESPONSE_ERROR_UPDATE_PREPARE
; }
14
15
void
HostOTABackend::set_update_md5
(
const
char
*expected_md5) {}
16
17
OTAResponseTypes
HostOTABackend::write
(uint8_t *data,
size_t
len
) {
return
OTA_RESPONSE_ERROR_WRITING_FLASH
; }
18
19
OTAResponseTypes
HostOTABackend::end
() {
return
OTA_RESPONSE_ERROR_UPDATE_END
; }
20
21
void
HostOTABackend::abort
() {}
22
23
}
// namespace esphome::ota
24
#endif
esphome::ota::HostOTABackend::write
OTAResponseTypes write(uint8_t *data, size_t len) override
Definition
ota_backend_host.cpp:17
esphome::ota::HostOTABackend::abort
void abort() override
Definition
ota_backend_host.cpp:21
esphome::ota::HostOTABackend::set_update_md5
void set_update_md5(const char *md5) override
Definition
ota_backend_host.cpp:15
esphome::ota::HostOTABackend::begin
OTAResponseTypes begin(size_t image_size) override
Definition
ota_backend_host.cpp:13
esphome::ota::HostOTABackend::end
OTAResponseTypes end() override
Definition
ota_backend_host.cpp:19
defines.h
esphome::ota
Definition
automation.h:8
esphome::ota::make_ota_backend
std::unique_ptr< ota::OTABackend > make_ota_backend()
Definition
ota_backend_arduino_libretiny.cpp:15
esphome::ota::OTAResponseTypes
OTAResponseTypes
Definition
ota_backend.h:14
esphome::ota::OTA_RESPONSE_ERROR_WRITING_FLASH
@ OTA_RESPONSE_ERROR_WRITING_FLASH
Definition
ota_backend.h:31
esphome::ota::OTA_RESPONSE_ERROR_UPDATE_END
@ OTA_RESPONSE_ERROR_UPDATE_END
Definition
ota_backend.h:32
esphome::ota::OTA_RESPONSE_ERROR_UPDATE_PREPARE
@ OTA_RESPONSE_ERROR_UPDATE_PREPARE
Definition
ota_backend.h:29
esphome::len
std::string size_t len
Definition
helpers.h:595
ota_backend_host.h
Generated by
1.12.0