[ersky9x] Radio blocked on start when playing a sound before SD card initialization end.

This commit is contained in:
bsongis
2012-07-27 17:52:03 +00:00
parent d2fabe2b2e
commit 174a7b29d9
5 changed files with 39 additions and 20 deletions
+8
View File
@@ -921,6 +921,10 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
DIR archiveFolder;
UINT written;
if (!sd_card_mounted()) {
return STR_NO_SDCARD;
}
// check and create folder here
strcpy(buf, STR_MODELS_PATH);
FRESULT result = f_opendir(&archiveFolder, buf);
@@ -992,6 +996,10 @@ const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
FIL restoreFile;
UINT read;
if (!sd_card_mounted()) {
return STR_NO_SDCARD;
}
strcpy(buf, STR_MODELS_PATH);
buf[sizeof(MODELS_PATH)-1] = '/';
strcpy(&buf[sizeof(MODELS_PATH)], model_name);