do not halt when sd-card init failed

This commit is contained in:
folkert van heusden 2024-05-11 17:16:06 +02:00
parent bb728e39b2
commit d1f2a16835
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -94,15 +94,17 @@ void start_disk(console *const cnsl)
#endif
#if defined(SHA2017)
#if defined(ESP32_WT_ETH01)
if (SD.begin(SdioConfig(FIFO_SDIO)))
disk_started = true;
#elif defined(SHA2017)
if (SD.begin(21, SD_SCK_MHZ(10)))
disk_started = true;
else
SD.initErrorHalt();
#elif !defined(BUILD_FOR_RP2040)
if (SD.begin(SS, SD_SCK_MHZ(15)))
disk_started = true;
else {
#endif
if (!disk_started) {
auto err = SD.sdErrorCode();
if (err)
cnsl->put_string_lf(format("SDerror: 0x%x, data: 0x%x", err, SD.sdErrorData()));
@ -110,7 +112,6 @@ void start_disk(console *const cnsl)
cnsl->put_string_lf("Failed to initialize SD card");
}
#endif
#endif
}
void ls_l(console *const cnsl)