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

Method writeBlock

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

Source from the content-addressed store, hash-verified

493}
494
495bool flasher::writeBlock(uint16_t offset, uint8_t *data, uint16_t len, bool infopage) {
496 if (infopage) {
497 if (!zbs->select_flash(1)) return false;
498 if (offset > 1024) return false;
499 } else {
500 if (!zbs->select_flash(0)) return false;
501 if (offset > 65535) return false;
502 }
503 for (uint32_t c = 0; c < len; c++) {
504 zbs->write_flash(c + offset, data[c]);
505 }
506 return true;
507}
508
509#ifndef C6_OTA_FLASHING
510uint16_t getAPUpdateVersion(uint8_t type) {

Callers 1

processFlasherCommandFunction · 0.45

Calls 2

select_flashMethod · 0.45
write_flashMethod · 0.45

Tested by

no test coverage detected