1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Fix flash m25p16 driver sector erase

The sector erase function was not taking into account the address size when sending the command to the device and the erase was failing for devices using 24bit addressing.
This commit is contained in:
Bruce Luckcuck 2019-05-25 12:27:18 -04:00
parent e54ef4815a
commit 99a87cb34f

View file

@ -250,7 +250,7 @@ static void m25p16_eraseSector(flashDevice_t *fdevice, uint32_t address)
m25p16_writeEnable(fdevice);
m25p16_transfer(fdevice->io.handle.busdev, out, NULL, sizeof(out));
m25p16_transfer(fdevice->io.handle.busdev, out, NULL, fdevice->isLargeFlash ? 5 : 4);
}
static void m25p16_eraseCompletely(flashDevice_t *fdevice)