mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/mtd_flashpage: fix erasure of multiple sectors
This commit is contained in:
parent
2c85ba2af2
commit
a15d50dffe
@ -106,7 +106,7 @@ int _erase(mtd_dev_t *dev, uint32_t addr, uint32_t size)
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < size; i += sector_size) {
|
||||
flashpage_write(flashpage_page((void *)dst_addr), NULL);
|
||||
flashpage_write(flashpage_page((void *)(dst_addr + i)), NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user