Updated initSd to stop trying when the SD card can be read, but no file system was found (#6)

This commit is contained in:
Jamie
2026-01-06 22:28:15 +09:00
committed by GitHub
parent ae26e9be0f
commit 117b25ae07

View File

@@ -132,12 +132,17 @@ static void initSd(void)
bool ok = false; bool ok = false;
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
if (f_mount(&sFatFs, "0:", 1) == FR_OK) FRESULT mountResult = f_mount(&sFatFs, "0:", 1);
if (mountResult == FR_OK)
{ {
ok = true; ok = true;
sIsSdCardMounted = true; sIsSdCardMounted = true;
break; break;
} }
else if (mountResult == FR_NO_FILESYSTEM)
{
break;
}
} }
if (!ok) if (!ok)
{ {