mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 19:54:14 +01:00
932e0469f7
* 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>
22 lines
537 B
C++
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
|