get info from infoblock (eeprom flash, kinda)
| 366 | |
| 367 | // get info from infoblock (eeprom flash, kinda) |
| 368 | bool flasher::readInfoBlock() { |
| 369 | if (!zbs->select_flash(1)) return false; |
| 370 | if (infoblock == nullptr) { |
| 371 | infoblock = (uint8_t *)malloc(1024); |
| 372 | if (infoblock == nullptr) return false; |
| 373 | } |
| 374 | for (uint16_t c = 0; c < 1024; c++) { |
| 375 | infoblock[c] = zbs->read_flash(c); |
| 376 | } |
| 377 | return true; |
| 378 | } |
| 379 | |
| 380 | // write info to infoblock |
| 381 | bool flasher::writeInfoBlock() { |
no test coverage detected