no sd if early fatal (#2680)
This commit is contained in:
parent
6cc7b0eeec
commit
370eb0d5a5
|
@ -327,6 +327,11 @@ void onUsbConnectedNotifyMmcI() {
|
||||||
* Returns a BaseBlockDevice* corresponding to the SD card if successful, otherwise nullptr.
|
* Returns a BaseBlockDevice* corresponding to the SD card if successful, otherwise nullptr.
|
||||||
*/
|
*/
|
||||||
static BaseBlockDevice* initializeMmcBlockDevice() {
|
static BaseBlockDevice* initializeMmcBlockDevice() {
|
||||||
|
// Don't try to mount SD card in case of fatal error - hardware may be in an unexpected state
|
||||||
|
if (hasFirmwareError()) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (!CONFIG(isSdCardEnabled)) {
|
if (!CONFIG(isSdCardEnabled)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue