Update develop. Ready for pre-release v0.4 #49
@ -37,7 +37,8 @@ bool mount_sd_card_if_avail(FATFS *fs)
|
|||||||
memset(fs, 0, sizeof(FATFS));
|
memset(fs, 0, sizeof(FATFS));
|
||||||
sdio_stop_clk();
|
sdio_stop_clk();
|
||||||
inserted_counter = 0;
|
inserted_counter = 0;
|
||||||
return false;
|
sd_card_mounted_state = false;
|
||||||
|
goto ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sdio_check_inserted() && inserted_counter < 255)
|
if (!sdio_check_inserted() && inserted_counter < 255)
|
||||||
@ -48,12 +49,13 @@ bool mount_sd_card_if_avail(FATFS *fs)
|
|||||||
res = f_mount(fs, "0:/", 1);
|
res = f_mount(fs, "0:/", 1);
|
||||||
if (res == FR_OK) {
|
if (res == FR_OK) {
|
||||||
led_set(1, 1);
|
led_set(1, 1);
|
||||||
return true;
|
sd_card_mounted_state = true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
sd_card_mounted_state = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret:
|
||||||
return sd_card_mounted_state;
|
return sd_card_mounted_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user