1
0
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:
Juergen Fitschen 2020-11-03 12:31:28 +01:00
parent 2c85ba2af2
commit a15d50dffe

View File

@ -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;