Separate OTABackend from OTA component (#6459)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Keith Burzinski
2024-05-15 21:01:09 -05:00
committed by GitHub
parent f91c31f093
commit f46c499c4e
40 changed files with 505 additions and 391 deletions
@@ -1,8 +1,7 @@
#include "esphome/core/defines.h"
#ifdef USE_ESP32_FRAMEWORK_ARDUINO
#include "esphome/core/defines.h"
#include "ota_backend_arduino_esp32.h"
#include "ota_component.h"
#include "ota_backend.h"
#include <Update.h>
@@ -10,6 +9,8 @@
namespace esphome {
namespace ota {
std::unique_ptr<ota::OTABackend> make_ota_backend() { return make_unique<ota::ArduinoESP32OTABackend>(); }
OTAResponseTypes ArduinoESP32OTABackend::begin(size_t image_size) {
bool ret = Update.begin(image_size, U_FLASH);
if (ret) {