Current consumption may depend on 3 different sources

Flash saving in FrSky code
SD card wav player (still read as raw 12000Hz 16bit samples)
This commit is contained in:
bsongis
2012-06-26 10:09:31 +00:00
parent 61bbfd6e7c
commit 5dd7c105b6
29 changed files with 1285 additions and 905 deletions
+2 -12
View File
@@ -920,14 +920,9 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
DIR archiveFolder;
UINT written;
FRESULT result = f_mount(0, &g_FATFS_Obj);
if (result != FR_OK) {
return SDCARD_ERROR(result);
}
// check and create folder here
strcpy(buf, STR_MODELS_PATH);
result = f_opendir(&archiveFolder, buf);
FRESULT result = f_opendir(&archiveFolder, buf);
if (result != FR_OK) {
result = f_mkdir(buf);
if (result != FR_OK)
@@ -995,17 +990,12 @@ const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
FIL restoreFile;
UINT read;
FRESULT result = f_mount(0, &g_FATFS_Obj);
if (result != FR_OK) {
return SDCARD_ERROR(result);
}
strcpy(buf, STR_MODELS_PATH);
buf[sizeof(MODELS_PATH)-1] = '/';
strcpy(&buf[sizeof(MODELS_PATH)], model_name);
strcpy(&buf[strlen(buf)], STR_MODELS_EXT);
result = f_open(&restoreFile, buf, FA_OPEN_EXISTING | FA_READ);
FRESULT result = f_open(&restoreFile, buf, FA_OPEN_EXISTING | FA_READ);
if (result != FR_OK) {
return SDCARD_ERROR(result);
}