X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fflash_lpc2.c;h=a78ade27c8bfe111e560d10a4a165071d3cc37c4;hb=d44a5cdd118dade91c5069b131192b5127c1b159;hp=6a8cc69ba9b04d68acfaeade0d9990682b9d04a5;hpb=cd31b2db0e5fc1aacb52c5acab53fdb89e6e7211;p=bertos.git diff --git a/bertos/cpu/arm/drv/flash_lpc2.c b/bertos/cpu/arm/drv/flash_lpc2.c index 6a8cc69b..a78ade27 100644 --- a/bertos/cpu/arm/drv/flash_lpc2.c +++ b/bertos/cpu/arm/drv/flash_lpc2.c @@ -179,10 +179,7 @@ static uint32_t addr_to_sector(size_t addr) static size_t lpc2_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), size); + memcpy(buf, (void *)(idx * blk->blk_size + offset), size); return size; }