Browse Source

Fail SD mount without SPI re-init (#19226)

vanilla_fb_2.0.x
Victor Oliveira 4 years ago
committed by GitHub
parent
commit
e3d855673e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Marlin/src/sd/cardreader.cpp

7
Marlin/src/sd/cardreader.cpp

@ -140,7 +140,7 @@ CardReader::CardReader() {
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
SET_INPUT_PULLUP(SD_DETECT_PIN);
#endif
#if PIN_EXISTS(SDPOWER)
OUT_WRITE(SDPOWER_PIN, HIGH); // Power the SD reader
#endif
@ -383,10 +383,9 @@ void CardReader::mount() {
if (flag.mounted)
cdroot();
else {
spiInit(SPI_SPEED); // Return to base SPI speed
else if (marlin_state != MF_INITIALIZING)
ui.set_status_P(GET_TEXT(MSG_SD_INIT_FAIL), -1);
}
ui.refresh();
}

Loading…
Cancel
Save