Skip to content

Commit

Permalink
Fail SD mount without SPI re-init (MarlinFirmware#19226)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv authored Sep 1, 2020
1 parent 62268aa commit e3d8556
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Marlin/src/sd/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit e3d8556

Please sign in to comment.