projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
STM32: USB: endpoint buffer must be 4-bytes aligned
[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 7f4e3bb7a9d32ddb4d2db82fcb5646e1c6dc30a5..281c2704c939ceb021fa86ae0bc2b4023624f4a0 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/flash_lm3s.c
+++ b/
bertos/cpu/cortex-m3/drv/flash_lm3s.c
@@
-111,10
+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)
{
static size_t lm3s_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;
}
return size;
}
@@
-203,7
+200,7
@@
static void common_init(Flash *fls)
}
}
-void flash_hw_init(Flash *fls, int flags)
;
+void flash_hw_init(Flash *fls, int flags)
{
common_init(fls);
fls->blk.priv.vt = &flash_lm3s_buffered_vt;
{
common_init(fls);
fls->blk.priv.vt = &flash_lm3s_buffered_vt;