mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Merge pull request #743 from blckmn/sdcard_insert_check
Added sdcard not present check
This commit is contained in:
commit
10bb3ec97d
2 changed files with 9 additions and 0 deletions
|
@ -192,6 +192,11 @@ static void sdcard_deselect(void)
|
|||
*/
|
||||
static void sdcard_reset(void)
|
||||
{
|
||||
if (!sdcard_isInserted()) {
|
||||
sdcard.state = SDCARD_STATE_NOT_PRESENT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sdcard.state >= SDCARD_STATE_READY) {
|
||||
spiSetDivisor(SDCARD_SPI_INSTANCE, SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER);
|
||||
}
|
||||
|
|
|
@ -2904,6 +2904,10 @@ static void cliStatus(char *cmdline)
|
|||
#endif
|
||||
|
||||
cliPrintf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cErrorCounter, sizeof(master_t));
|
||||
|
||||
#ifdef USE_SDCARD
|
||||
cliSdInfo(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef SKIP_TASK_STATISTICS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue