X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fflash_at91.c;h=1cdf6b788e0e8678ea6a7a5fc6609aa640a6c72e;hb=23f95752ffe03a5f0c262b1f896211aedb185dda;hp=adeb558f2f6a823c9f6c2f7916f6d4a9711ef344;hpb=574d08f7aba9cfec59053ddcb7d2af3ebd0fda64;p=bertos.git diff --git a/bertos/cpu/arm/drv/flash_at91.c b/bertos/cpu/arm/drv/flash_at91.c index adeb558f..1cdf6b78 100644 --- a/bertos/cpu/arm/drv/flash_at91.c +++ b/bertos/cpu/arm/drv/flash_at91.c @@ -139,10 +139,7 @@ static bool flash_getStatus(struct KBlock *blk) static size_t at91_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - - memcpy(buf, (void *)(idx * blk->blk_size + FLASH_BASE), size); + memcpy(buf, (void *)(idx * blk->blk_size + FLASH_BASE + offset), size); return size; }