1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +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

@ -94,3 +94,4 @@ void flashPartitionSet(uint8_t index, uint32_t startSector, uint32_t endSector);
flashPartition_t *flashPartitionFindByType(flashPartitionType_e type);
const flashPartition_t *flashPartitionFindByIndex(uint8_t index);
const char *flashPartitionGetTypeName(flashPartitionType_e type);
int flashPartitionCount(void);