static size_t at91_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size)
{
- memcpy(buf, (void *)(idx * blk->blk_size + FLASH_BASE), size);
+ memcpy(buf, (void *)(idx * blk->blk_size + FLASH_BASE + offset), size);
return size;
}