14static const char *
const TAG =
"ota.arduino_rp2040";
16std::unique_ptr<ArduinoRP2040OTABackend>
make_ota_backend() {
return make_unique<ArduinoRP2040OTABackend>(); }
21 bool ret = Update.begin(image_size, U_FLASH);
27 uint8_t error = Update.getError();
28 if (error == UPDATE_ERROR_BOOTSTRAP)
30 if (error == UPDATE_ERROR_NEW_FLASH_CONFIG)
32 if (error == UPDATE_ERROR_FLASH_CONFIG)
34 if (error == UPDATE_ERROR_SPACE)
37 ESP_LOGE(TAG,
"Begin error: %d", error);
44 this->md5_set_ =
true;
53 uint8_t error = Update.getError();
54 ESP_LOGE(TAG,
"Write error: %d", error);
62 if (Update.end(!this->md5_set_)) {
66 uint8_t error = Update.getError();
67 ESP_LOGE(TAG,
"End error: %d", error);
OTAResponseTypes write(uint8_t *data, size_t len)
OTAResponseTypes begin(size_t image_size)
void set_update_md5(const char *md5)
@ OTA_RESPONSE_ERROR_WRONG_NEW_FLASH_CONFIG
@ OTA_RESPONSE_ERROR_WRONG_CURRENT_FLASH_CONFIG
@ OTA_RESPONSE_ERROR_WRITING_FLASH
@ OTA_RESPONSE_ERROR_UPDATE_END
@ OTA_RESPONSE_ERROR_RP2040_NOT_ENOUGH_SPACE
@ OTA_RESPONSE_ERROR_UNKNOWN
@ OTA_RESPONSE_ERROR_INVALID_BOOTSTRAPPING
std::unique_ptr< ArduinoLibreTinyOTABackend > make_ota_backend()
void preferences_prevent_write(bool prevent)