ESPHome  2022.8.0
ota_backend_arduino_esp8266.h
Go to the documentation of this file.
1 #pragma once
2 #include "esphome/core/defines.h"
3 #ifdef USE_ARDUINO
4 #ifdef USE_ESP8266
5 
6 #include "ota_component.h"
7 #include "ota_backend.h"
8 #include "esphome/core/macros.h"
9 
10 namespace esphome {
11 namespace ota {
12 
14  public:
15  OTAResponseTypes begin(size_t image_size) override;
16  void set_update_md5(const char *md5) override;
17  OTAResponseTypes write(uint8_t *data, size_t len) override;
18  OTAResponseTypes end() override;
19  void abort() override;
20 #if USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 7, 0)
21  bool supports_compression() override { return true; }
22 #else
23  bool supports_compression() override { return false; }
24 #endif
25 };
26 
27 } // namespace ota
28 } // namespace esphome
29 
30 #endif
31 #endif
OTAResponseTypes begin(size_t image_size) override
std::string size_t len
Definition: helpers.h:278
OTAResponseTypes write(uint8_t *data, size_t len) override
Definition: a4988.cpp:4