15 static const char *
const TAG =
"ota.arduino_esp8266";
17 std::unique_ptr<ota::OTABackend>
make_ota_backend() {
return make_unique<ota::ArduinoESP8266OTABackend>(); }
20 bool ret = Update.begin(image_size, U_FLASH);
26 uint8_t error = Update.getError();
27 if (error == UPDATE_ERROR_BOOTSTRAP)
29 if (error == UPDATE_ERROR_NEW_FLASH_CONFIG)
31 if (error == UPDATE_ERROR_FLASH_CONFIG)
33 if (error == UPDATE_ERROR_SPACE)
36 ESP_LOGE(TAG,
"Begin error: %d", error);
44 size_t written = Update.write(data, len);
49 uint8_t error = Update.getError();
50 ESP_LOGE(TAG,
"Write error: %d", error);
60 uint8_t error = Update.getError();
61 ESP_LOGE(TAG,
"End error: %d", error);
void set_update_md5(const char *md5) override
OTAResponseTypes begin(size_t image_size) override
std::unique_ptr< ota::OTABackend > make_ota_backend()
OTAResponseTypes end() override
OTAResponseTypes write(uint8_t *data, size_t len) override
void preferences_prevent_write(bool prevent)
Implementation of SPI Controller mode.