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

Method getInfoBlockMD5

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

Source from the content-addressed store, hash-verified

157}
158
159bool flasher::getInfoBlockMD5() {
160 if (!zbs->select_flash(1)) return false;
161 for (uint16_t c = 0; c < 16; c++) {
162 md5[c] = zbs->read_flash(c + 0x30);
163 }
164 uint16_t macsum = 0;
165 for (uint8_t c = 0; c < 16; c++) {
166 macsum += md5[c];
167 sprintf(md5char + (2 * c), "%02X", md5[c]);
168 }
169 Seriallog.printf("Infoblock MD5=%s\r\n", md5char);
170 if (macsum == 0) return false; // invalid mac
171 if (macsum > 0xF00) return false; // *probably* an invalid mac
172 return true;
173}
174
175bool flasher::getInfoBlockType() {
176 if (!zbs->select_flash(1)) return false;

Callers 5

doAPFlashFunction · 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