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_lm3s.c
diff --git
a/bertos/cpu/cortex-m3/drv/flash_lm3s.c
b/bertos/cpu/cortex-m3/drv/flash_lm3s.c
index df478b61124422efd8aafc86800f9562e6098cc4..281c2704c939ceb021fa86ae0bc2b4023624f4a0 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/flash_lm3s.c
+++ b/
bertos/cpu/cortex-m3/drv/flash_lm3s.c
@@
-111,7
+111,7
@@
static int lm3s_writeWord(struct KBlock *blk, uint32_t addr, uint32_t data)
static size_t lm3s_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;
}