mirror of
https://github.com/LNH-team/dspico-firmware.git
synced 2026-06-02 09:16:50 +02:00
Updated initSd to stop trying when the SD card can be read, but no file system was found (#6)
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user