projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Consider the offset when read directly into flash memory.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
flash_stm32.c
diff --git
a/bertos/cpu/cortex-m3/drv/flash_stm32.c
b/bertos/cpu/cortex-m3/drv/flash_stm32.c
index a11777b75c62544f3e2633a0eac6448930b1bc6e..62e448f3ab35dd9d201ba78756c89b3655247d9f 100644
(file)
--- 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;
}