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

Method writeBlock256

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

Source from the content-addressed store, hash-verified

349}
350
351bool flasher::writeBlock256(uint16_t offset, uint8_t *flashbuffer) {
352 for (uint16_t c = 0; c < 256; c++) {
353 if (flashbuffer[c] == 0xFF) goto flashWriteSuccess;
354 for (uint8_t i = 0; i < MAX_WRITE_ATTEMPTS; i++) {
355 zbs->write_flash(offset + c, flashbuffer[c]);
356 if (zbs->read_flash(offset + c) == flashbuffer[c]) {
357 goto flashWriteSuccess;
358 }
359 }
360 return false;
361 flashWriteSuccess:
362 continue;
363 }
364 return true;
365}
366
367// get info from infoblock (eeprom flash, kinda)
368bool flasher::readInfoBlock() {

Callers

nothing calls this directly

Calls 2

write_flashMethod · 0.45
read_flashMethod · 0.45

Tested by

no test coverage detected