1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Use full erase when possible for FLASHFS erase

If there is only a single partition, its type is FLASHFS, and it uses the entire geometry, then perform a full rather than a sector-based erase.

The full erase is significantly faster than erasing by individual sectors.
This commit is contained in:
Bruce Luckcuck 2019-05-25 12:18:52 -04:00
parent e54ef4815a
commit aaa2f9682d
3 changed files with 24 additions and 3 deletions

View file

@ -395,4 +395,9 @@ bool flashInit(const flashConfig_t *flashConfig)
return haveFlash;
}
int flashPartitionCount(void)
{
return flashPartitions;
}
#endif // USE_FLASH_CHIP