Skip to content

Commit 44a15af

Browse files
committed
Fix commits
1 parent 15f5250 commit 44a15af

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Diff for: cores/esp32/Esp.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern "C" {
6060
#elif CONFIG_IDF_TARGET_ESP32H2
6161
#include "esp32h2/rom/spi_flash.h"
6262
#define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32h2 is located at 0x0000
63-
#else
63+
#else
6464
#error Target CONFIG_IDF_TARGET is not supported
6565
#endif
6666
#else // ESP32 Before IDF 4.0
@@ -249,7 +249,9 @@ String EspClass::getSketchMD5()
249249
lengthLeft -= readBytes;
250250
offset += readBytes;
251251

252+
#if CONFIG_FREERTOS_UNICORE
252253
delay(1); // Fix solo WDT
254+
#endif
253255
}
254256
free(pb);
255257
md5.calculate();
@@ -525,17 +527,17 @@ bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size)
525527
return esp_flash_read(esp_flash_default_chip, (void*) data, offset, size) == ESP_OK;
526528
}
527529

528-
bool EspClass::partitionEraseRange(const esp_partition_t *partition, uint32_t offset, size_t size)
530+
bool EspClass::partitionEraseRange(const esp_partition_t *partition, uint32_t offset, size_t size)
529531
{
530532
return esp_partition_erase_range(partition, offset, size) == ESP_OK;
531533
}
532534

533-
bool EspClass::partitionWrite(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
535+
bool EspClass::partitionWrite(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
534536
{
535537
return esp_partition_write(partition, offset, data, size) == ESP_OK;
536538
}
537539

538-
bool EspClass::partitionRead(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
540+
bool EspClass::partitionRead(const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
539541
{
540542
return esp_partition_read(partition, offset, data, size) == ESP_OK;
541543
}

Diff for: libraries/Update/src/Updater.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ size_t UpdateClass::writeStream(Stream &data) {
368368
bytesToRead = remaining();
369369
}
370370

371-
/*
371+
/*
372372
Init read&timeout counters and try to read, if read failed, increase counter,
373373
wait 100ms and try to read again. If counter > 300 (30 sec), give up/abort
374374
*/
@@ -394,7 +394,9 @@ size_t UpdateClass::writeStream(Stream &data) {
394394
return written;
395395
written += toRead;
396396

397+
#if CONFIG_FREERTOS_UNICORE
397398
delay(1); // Fix solo WDT
399+
#endif
398400
}
399401
return written;
400402
}

0 commit comments

Comments
 (0)