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:
parent
e54ef4815a
commit
aaa2f9682d
3 changed files with 24 additions and 3 deletions
|
@ -395,4 +395,9 @@ bool flashInit(const flashConfig_t *flashConfig)
|
|||
|
||||
return haveFlash;
|
||||
}
|
||||
|
||||
int flashPartitionCount(void)
|
||||
{
|
||||
return flashPartitions;
|
||||
}
|
||||
#endif // USE_FLASH_CHIP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue