mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 08:08:25 +00:00
Save some program memory
This will save some program memory with no speed lose
This commit is contained in:
parent
ab7fb5b2e3
commit
82dc89bfd2
1 changed files with 6 additions and 5 deletions
|
@ -405,21 +405,22 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
|
|||
else if (readData(dst, 512))
|
||||
return true;
|
||||
|
||||
chipSelectHigh();
|
||||
if (!--retryCnt) break;
|
||||
|
||||
chipSelectHigh();
|
||||
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
|
||||
errorCode_ = 0;
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
if (cardCommand(CMD17, blockNumber))
|
||||
if (cardCommand(CMD17, blockNumber)) {
|
||||
error(SD_CARD_ERROR_CMD17);
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return readData(dst, 512);
|
||||
#endif
|
||||
|
||||
chipSelectHigh();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue