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

Method readBlock

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

Source from the content-addressed store, hash-verified

479}
480
481bool flasher::readBlock(uint16_t offset, uint8_t *data, uint16_t len, bool infopage) {
482 if (infopage) {
483 if (!zbs->select_flash(1)) return false;
484 if (offset > 1024) return false;
485 } else {
486 if (!zbs->select_flash(0)) return false;
487 if (offset > 65535) return false;
488 }
489 for (uint32_t c = 0; c < len; c++) {
490 data[c] = zbs->read_flash(offset + c);
491 }
492 return true;
493}
494
495bool flasher::writeBlock(uint16_t offset, uint8_t *data, uint16_t len, bool infopage) {
496 if (infopage) {

Callers 1

processFlasherCommandFunction · 0.45

Calls 2

select_flashMethod · 0.45
read_flashMethod · 0.45

Tested by

no test coverage detected