[FLASHFS] Reinitialise flashFs after erasing flash chip. (#8237)
[FLASHFS] Reinitialise flashFs after erasing flash chip.
This commit is contained in:
commit
31a059d4d5
|
@ -2239,6 +2239,7 @@ static void cliFlashErase(char *cmdline)
|
|||
|
||||
bufWriterFlush(cliWriter);
|
||||
flashfsEraseCompletely();
|
||||
flashfsInit();
|
||||
|
||||
while (!flashfsIsReady()) {
|
||||
#ifndef MINIMAL_CLI
|
||||
|
|
|
@ -2342,6 +2342,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
|||
#ifdef USE_FLASHFS
|
||||
case MSP_DATAFLASH_ERASE:
|
||||
flashfsEraseCompletely();
|
||||
flashfsInit();
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue