mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-20 10:50:10 +00:00
sw: dfu: fix calculation for address offset
We were using the wrong offset for address calculation. Use the block size, rather than the program size. This wasn't an issue before, because the block size and the program size were both 256 bytes. Now the block size can be 1024 bytes. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
1a5867c5e5
commit
646388fcb7
@ -137,7 +137,7 @@ static uint32_t address_for_block(unsigned blockNum)
|
||||
else
|
||||
starting_offset = RESCUE_IMAGE_OFFSET;
|
||||
|
||||
return starting_offset + (blockNum * WRITE_SIZE);
|
||||
return starting_offset + (blockNum * DFU_TRANSFER_SIZE);
|
||||
}
|
||||
|
||||
void dfu_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user