1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/mtd_mci: fix sector erase

This commit is contained in:
Benjamin Valentin 2022-03-24 22:55:54 +01:00
parent 2f7cf35173
commit 4694c6c4c4

View File

@ -118,10 +118,11 @@ static int mtd_mci_erase_sector(mtd_dev_t *dev, uint32_t sector, uint32_t count)
{
(void)dev;
while (count--) {
mci_ioctl(CTRL_ERASE_SECTOR, &sector);
++sector;
}
uint32_t arg[2] = {
sector, sector + count - 1
};
mci_ioctl(CTRL_ERASE_SECTOR, arg);
return 0;
}