mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Add flash partitioning system
This commit is contained in:
parent
ba047e0559
commit
92999681e3
9 changed files with 215 additions and 56 deletions
|
@ -2209,16 +2209,24 @@ static void cliSdInfo(char *cmdline)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef USE_FLASHFS
|
||||
#ifdef USE_FLASH_CHIP
|
||||
|
||||
static void cliFlashInfo(char *cmdline)
|
||||
{
|
||||
const flashGeometry_t *layout = flashfsGetGeometry();
|
||||
const flashGeometry_t *layout = flashGetGeometry();
|
||||
|
||||
UNUSED(cmdline);
|
||||
|
||||
cliPrintLinef("Flash sectors=%u, sectorSize=%u, pagesPerSector=%u, pageSize=%u, totalSize=%u, usedSize=%u",
|
||||
layout->sectors, layout->sectorSize, layout->pagesPerSector, layout->pageSize, layout->totalSize, flashfsGetOffset());
|
||||
cliPrintLinef("Flash sectors=%u, sectorSize=%u, pagesPerSector=%u, pageSize=%u, totalSize=%u",
|
||||
layout->sectors, layout->sectorSize, layout->pagesPerSector, layout->pageSize, layout->totalSize);
|
||||
#ifdef USE_FLASHFS
|
||||
const flashPartition_t *flashPartition = flashFindPartitionByUsage(FLASH_PARTITION_FLASHFS);
|
||||
|
||||
cliPrintLinef("FlashFS size=%u, usedSize=%u",
|
||||
FLASH_PARTITION_SECTOR_COUNT(flashPartition) * layout->sectorSize,
|
||||
flashfsGetOffset()
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue