Added sdcard not present check
This commit is contained in:
parent
4e894cc90f
commit
7ca18b52ca
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue