mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Updater: read data back from flash before calculating MD5
This commit is contained in:
parent
44d27228c5
commit
0c58dc1536
@ -202,12 +202,14 @@ bool UpdaterClass::end(bool evenIfRemaining){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool UpdaterClass::_writeBuffer(){
|
bool UpdaterClass::_writeBuffer(){
|
||||||
|
|
||||||
if(!_async) yield();
|
if(!_async) yield();
|
||||||
bool result = ESP.flashEraseSector(_currentAddress/FLASH_SECTOR_SIZE);
|
bool result = ESP.flashEraseSector(_currentAddress/FLASH_SECTOR_SIZE);
|
||||||
if(!_async) yield();
|
if(!_async) yield();
|
||||||
if (result) {
|
if (result) {
|
||||||
result = ESP.flashWrite(_currentAddress, (uint32_t*) _buffer, _bufferLen);
|
result = ESP.flashWrite(_currentAddress, (uint32_t*) _buffer, _bufferLen);
|
||||||
|
if (result) {
|
||||||
|
result = ESP.flashRead(_currentAddress, (uint32_t*) _buffer, _bufferLen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!_async) yield();
|
if(!_async) yield();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user