icopyx bootloader safeguard

This commit is contained in:
Philippe Teuwen committed 2021-08-21 23:52:15 +02:00
1 parent e79fb92074
commit 0384359aa4
4 files changed
+23 -1

No files matched your search

+4
View File
@@ -522,7 +522,11 @@ static int write_block(uint32_t address, uint8_t *data, uint32_t length) {
memset(block_buf, 0xFF, BLOCK_SIZE);
memcpy(block_buf, data, length);
PacketResponseNG resp;
#if defined ICOPYX
SendCommandBL(CMD_FINISH_WRITE, address, 0xff, 0x1fd, block_buf, length);
#else
SendCommandBL(CMD_FINISH_WRITE, address, 0, 0, block_buf, length);
#endif
int ret = wait_for_ack(&resp);
if (ret && resp.oldarg[0]) {
uint32_t lock_bits = resp.oldarg[0] >> 16;