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:
parent
e54ef4815a
commit
99a87cb34f
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue