X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fflash_stm32.c;h=62e448f3ab35dd9d201ba78756c89b3655247d9f;hb=854199db6c8a6aee9b131095a8c3d7934ebcc1ae;hp=a11777b75c62544f3e2633a0eac6448930b1bc6e;hpb=af6f92fdde767ddb88623acead8a59a468c1ae15;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/flash_stm32.c b/bertos/cpu/cortex-m3/drv/flash_stm32.c index a11777b7..62e448f3 100644 --- a/bertos/cpu/cortex-m3/drv/flash_stm32.c +++ b/bertos/cpu/cortex-m3/drv/flash_stm32.c @@ -139,7 +139,7 @@ static void stm32_flash_clearerror(struct KBlock *blk) static size_t stm32_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - memcpy(buf, (void *)(idx * blk->blk_size), size); + memcpy(buf, (void *)(idx * blk->blk_size + offset), size); return size; }