mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Rebased (size PR is now in)
This commit is contained in:
commit
6b81e70f41
23 changed files with 705 additions and 546 deletions
|
@ -2252,18 +2252,35 @@ static void cliFlashInfo(char *cmdline)
|
|||
layout->sectors, layout->sectorSize, layout->pagesPerSector, layout->pageSize, layout->totalSize, flashfsGetOffset());
|
||||
}
|
||||
|
||||
|
||||
static void cliFlashErase(char *cmdline)
|
||||
{
|
||||
UNUSED(cmdline);
|
||||
|
||||
cliPrintf("Erasing...\r\n");
|
||||
#ifndef CLI_MINIMAL_VERBOSITY
|
||||
uint32_t i;
|
||||
cliPrintf("Erasing, please wait ... \r\n");
|
||||
#else
|
||||
cliPrintf("Erasing,\r\n");
|
||||
#endif
|
||||
|
||||
bufWriterFlush(cliWriter);
|
||||
flashfsEraseCompletely();
|
||||
|
||||
while (!flashfsIsReady()) {
|
||||
#ifndef CLI_MINIMAL_VERBOSITY
|
||||
cliPrintf(".");
|
||||
if (i++ > 120) {
|
||||
i=0;
|
||||
cliPrintf("\r\n");
|
||||
}
|
||||
|
||||
bufWriterFlush(cliWriter);
|
||||
#endif
|
||||
delay(100);
|
||||
}
|
||||
|
||||
cliPrintf("Done.\r\n");
|
||||
cliPrintf("\r\nDone.\r\n");
|
||||
}
|
||||
|
||||
#ifdef USE_FLASH_TOOLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue