mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Add flash partitioning system
This commit is contained in:
parent
ba047e0559
commit
92999681e3
9 changed files with 215 additions and 56 deletions
|
@ -432,8 +432,11 @@ static void osdGetBlackboxStatusString(char * buff)
|
|||
#ifdef USE_FLASHFS
|
||||
case BLACKBOX_DEVICE_FLASH:
|
||||
if (storageDeviceIsWorking) {
|
||||
const flashGeometry_t *geometry = flashfsGetGeometry();
|
||||
storageTotal = geometry->totalSize / 1024;
|
||||
|
||||
const flashPartition_t *flashPartition = flashFindPartitionByUsage(FLASH_PARTITION_FLASHFS);
|
||||
const flashGeometry_t *flashGeometry = flashGetGeometry();
|
||||
|
||||
storageTotal = ((FLASH_PARTITION_SECTOR_COUNT(flashPartition) * flashGeometry->sectorSize) / 1024);
|
||||
storageUsed = flashfsGetOffset() / 1024;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue