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

Method getInfoBlockMac

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

Source from the content-addressed store, hash-verified

142}
143
144bool flasher::getInfoBlockMac() {
145 if (!zbs->select_flash(1)) return false;
146 for (uint16_t c = 7; c < 8; c--) {
147 mac[7 - c] = zbs->read_flash(c + 0x10);
148 }
149 uint16_t macsum = 0;
150 for (uint8_t c = 0; c < 8; c++) {
151 macsum += mac[c];
152 }
153 Seriallog.printf("Infopage mac=%02X%02X%02X%02X%02X%02X%02X%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], mac[6], mac[7]);
154 if (macsum == 0) return false;
155 if (macsum > 0x5F9) return false;
156 return true;
157}
158
159bool flasher::getInfoBlockMD5() {
160 if (!zbs->select_flash(1)) return false;

Callers 5

doForcedAPFlashFunction · 0.45
doAPUpdateFunction · 0.45
doTagFlashFunction · 0.45
autoFlashFunction · 0.45
webFlasherTaskFunction · 0.45

Calls 3

printfMethod · 0.80
select_flashMethod · 0.45
read_flashMethod · 0.45

Tested by

no test coverage detected