projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AT91SAM7: add EMAC ethernet driver
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
flash_lpc2.c
diff --git
a/bertos/cpu/arm/drv/flash_lpc2.c
b/bertos/cpu/arm/drv/flash_lpc2.c
index f25e7b92c756a8332c848b6ee8e822accf2fd8d8..a78ade27c8bfe111e560d10a4a165071d3cc37c4 100644
(file)
--- a/
bertos/cpu/arm/drv/flash_lpc2.c
+++ b/
bertos/cpu/arm/drv/flash_lpc2.c
@@
-179,7
+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)
{
static size_t lpc2_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;
}
return size;
}