13static const char *
const TAG =
"ota.arduino_libretiny";
18 bool ret = Update.begin(image_size, U_FLASH);
23 uint8_t error = Update.getError();
24 if (error == UPDATE_ERROR_SIZE)
27 ESP_LOGE(TAG,
"Begin error: %d", error);
35 size_t written = Update.write(data,
len);
40 uint8_t error = Update.getError();
41 ESP_LOGE(TAG,
"Write error: %d", error);
51 uint8_t error = Update.getError();
52 ESP_LOGE(TAG,
"End error: %d", error);
void set_update_md5(const char *md5) override
OTAResponseTypes end() override
OTAResponseTypes begin(size_t image_size) override
OTAResponseTypes write(uint8_t *data, size_t len) override
std::unique_ptr< ota::OTABackend > make_ota_backend()
@ OTA_RESPONSE_ERROR_ESP32_NOT_ENOUGH_SPACE
@ OTA_RESPONSE_ERROR_WRITING_FLASH
@ OTA_RESPONSE_ERROR_UPDATE_END
@ OTA_RESPONSE_ERROR_UNKNOWN
Providing packet encoding functions for exchanging data with a remote host.
std::unique_ptr< T > make_unique(Args &&...args)