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; (void)dev;
while (count--) { uint32_t arg[2] = {
mci_ioctl(CTRL_ERASE_SECTOR, &sector); sector, sector + count - 1
++sector; };
}
mci_ioctl(CTRL_ERASE_SECTOR, arg);
return 0; return 0;
} }