mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
FAT emulation of onboard flash for MSC (#5650)
This commit is contained in:
parent
c305833c8b
commit
d749879cf6
15 changed files with 1423 additions and 11 deletions
|
@ -3746,7 +3746,14 @@ static void cliMsc(char *cmdline)
|
|||
{
|
||||
UNUSED(cmdline);
|
||||
|
||||
if (sdcard_isFunctional()) {
|
||||
if (false
|
||||
#ifdef USE_SDCARD
|
||||
|| sdcard_isFunctional()
|
||||
#endif
|
||||
#ifdef USE_FLASHFS
|
||||
|| flashfsGetSize() > 0
|
||||
#endif
|
||||
) {
|
||||
cliPrintHashLine("restarting in mass storage mode");
|
||||
cliPrint("\r\nRebooting");
|
||||
bufWriterFlush(cliWriter);
|
||||
|
@ -3766,7 +3773,7 @@ static void cliMsc(char *cmdline)
|
|||
__disable_irq();
|
||||
NVIC_SystemReset();
|
||||
} else {
|
||||
cliPrint("\r\nSD Card not present or failed to initialize!");
|
||||
cliPrint("\r\nStorage not present or failed to initialize!");
|
||||
bufWriterFlush(cliWriter);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue