Files
esphome-lsm6ds/esphome/components/ota/ota_backend_host.cpp
T
7cfab58a05 [ota] Add partition table update functionality to ota component (#15780)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-05-03 19:42:10 -05:00

27 lines
806 B
C++

#ifdef USE_HOST
#include "ota_backend_host.h"
#include "esphome/core/defines.h"
namespace esphome::ota {
// Stub implementation - OTA is not supported on host platform.
// All methods return error codes to allow compilation of configs with OTA triggers.
std::unique_ptr<HostOTABackend> make_ota_backend() { return make_unique<HostOTABackend>(); }
OTAResponseTypes HostOTABackend::begin(size_t image_size, OTAType ota_type) {
return OTA_RESPONSE_ERROR_UPDATE_PREPARE;
}
void HostOTABackend::set_update_md5(const char *expected_md5) {}
OTAResponseTypes HostOTABackend::write(uint8_t *data, size_t len) { return OTA_RESPONSE_ERROR_WRITING_FLASH; }
OTAResponseTypes HostOTABackend::end() { return OTA_RESPONSE_ERROR_UPDATE_END; }
void HostOTABackend::abort() {}
} // namespace esphome::ota
#endif