esphome/esphome/components/ota/ota_backend_arduino_esp32.h
Maurice Makaay 932e0469f7
Fix ESP32 esp-idf OTA updates (#2424)
* WIP on separating out the OTA backends.

* Split off the individual OTA backends.

* Cleanup the three backends, split into .h and .cpp.

* After successfull flashing, activate the new boot partition.

* Fix linting issues.

* Minor cleanup

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-10-02 16:02:01 +02:00

22 lines
537 B
C++

#pragma once
#include "esphome/core/defines.h"
#ifdef USE_ESP32_FRAMEWORK_ARDUINO
#include "ota_component.h"
#include "ota_backend.h"
namespace esphome {
namespace ota {
class ArduinoESP32OTABackend : public OTABackend {
OTAResponseTypes begin(size_t image_size) override;
void set_update_md5(const char *md5) override;
OTAResponseTypes write(uint8_t *data, size_t len) override;
OTAResponseTypes end() override;
void abort() override;
};
} // namespace ota
} // namespace esphome
#endif // USE_ESP32_FRAMEWORK_ARDUINO