| 142 | } |
| 143 | |
| 144 | bool 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 | |
| 159 | bool flasher::getInfoBlockMD5() { |
| 160 | if (!zbs->select_flash(1)) return false; |
no test coverage detected