mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Save some program memory
This will save some program memory with no speed lose
This commit is contained in:
parent
f37c64ee5b
commit
be717b3c07
@ -339,21 +339,22 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
|
|||||||
else if (readData(dst, 512))
|
else if (readData(dst, 512))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
chipDeselect();
|
||||||
if (!--retryCnt) break;
|
if (!--retryCnt) break;
|
||||||
|
|
||||||
chipDeselect();
|
|
||||||
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
|
cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
|
||||||
errorCode_ = 0;
|
errorCode_ = 0;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
#else
|
#else
|
||||||
if (cardCommand(CMD17, blockNumber))
|
if (cardCommand(CMD17, blockNumber)) {
|
||||||
error(SD_CARD_ERROR_CMD17);
|
error(SD_CARD_ERROR_CMD17);
|
||||||
|
chipDeselect();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return readData(dst, 512);
|
return readData(dst, 512);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chipDeselect();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user