MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / backupFlash

Method backupFlash

ESP32_AP-Flasher/src/flasher.cpp:272–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272bool flasher::backupFlash() {
273 getFirmwareMD5();
274 if (!zbs->select_flash(0)) return false;
275 md5char[16] = 0x00;
276 xSemaphoreTake(fsMutex, portMAX_DELAY);
277 fs::File backup = contentFS->open("/" + (String)md5char + "_backup.bin", "w", true);
278 for (uint32_t c = 0; c < 65535; c++) {
279 backup.write(zbs->read_flash(c));
280 }
281 backup.close();
282 xSemaphoreGive(fsMutex);
283 return true;
284}
285
286// extract original mac from firmware (1.54" and 2.9") and make it 2 bytes longer based on info in settings.h
287void flasher::get_mac_format1() {

Callers 4

doAPFlashFunction · 0.45
doTagFlashFunction · 0.45
autoFlashFunction · 0.45
webFlasherTaskFunction · 0.45

Calls 5

openMethod · 0.80
closeMethod · 0.80
select_flashMethod · 0.45
writeMethod · 0.45
read_flashMethod · 0.45

Tested by

no test coverage detected