| 493 | } |
| 494 | |
| 495 | bool 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 |
| 510 | uint16_t getAPUpdateVersion(uint8_t type) { |
no test coverage detected