Re #2026: DISKIO_SIMU renamed to SIMU_DISKIO
This commit is contained in:
+3
-3
@@ -346,7 +346,7 @@ TARANIS_INTERNAL_PPM = NO
|
||||
# uses "./sdcard.image" file as image of SD card.
|
||||
# This file must contain whole SD card from first to last sector
|
||||
# Values = NO, YES
|
||||
DISKIO_SIMU = NO
|
||||
SIMU_DISKIO = NO
|
||||
|
||||
#------- END BUILD OPTIONS ---------------------------
|
||||
|
||||
@@ -1567,8 +1567,8 @@ FOXLIB=-L/usr/local/lib \
|
||||
-lFOX-1.6 \
|
||||
-Wl,-rpath,$(FOXPATH)/src/.libs
|
||||
|
||||
ifeq ($(DISKIO_SIMU), YES)
|
||||
CPPDEFS += -DDISKIO_SIMU
|
||||
ifeq ($(SIMU_DISKIO), YES)
|
||||
CPPDEFS += -DSIMU_DISKIO
|
||||
CPPSRC += FatFs/ff.c FatFs/option/ccsbcs.c
|
||||
endif
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ const char *fileCopy(const char *filename, const char *srcDir, const char *destD
|
||||
#endif // #if defined(PCBTARANIS)
|
||||
|
||||
|
||||
#if !defined(SIMU) || defined(DISKIO_SIMU)
|
||||
#if !defined(SIMU) || defined(SIMU_DISKIO)
|
||||
uint32_t sdGetNoSectors()
|
||||
{
|
||||
static DWORD noSectors = 0;
|
||||
@@ -256,7 +256,7 @@ uint32_t sdGetFreeSectors()
|
||||
return nofree * fat->csize;
|
||||
}
|
||||
|
||||
#else // #if !defined(SIMU) || defined(DISKIO_SIMU)
|
||||
#else // #if !defined(SIMU) || defined(SIMU_DISKIO)
|
||||
|
||||
uint32_t sdGetNoSectors()
|
||||
{
|
||||
@@ -273,4 +273,4 @@ uint32_t sdGetFreeSectors()
|
||||
return 10;
|
||||
}
|
||||
|
||||
#endif // #if !defined(SIMU) || defined(DISKIO_SIMU)
|
||||
#endif // #if !defined(SIMU) || defined(SIMU_DISKIO)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
#if defined(DISKIO_SIMU)
|
||||
#if defined(SIMU_DISKIO)
|
||||
FILE * diskImage = 0;
|
||||
#endif
|
||||
|
||||
@@ -329,7 +329,7 @@ void *main_thread(void *)
|
||||
|
||||
eeReadAll(); // load general setup and selected model
|
||||
|
||||
#if defined(DISKIO_SIMU)
|
||||
#if defined(SIMU_DISKIO)
|
||||
f_mount(&g_FATFS_Obj, "", 1);
|
||||
// call sdGetFreeSectors() now because f_getfree() takes a long time first time it's called
|
||||
sdGetFreeSectors();
|
||||
@@ -375,7 +375,7 @@ void *main_thread(void *)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DISKIO_SIMU)
|
||||
#if defined(SIMU_DISKIO)
|
||||
if (diskImage) {
|
||||
fclose(diskImage);
|
||||
}
|
||||
@@ -510,7 +510,7 @@ static void EeFsDump(){
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD) && !defined(DISKIO_SIMU)
|
||||
#if defined(SDCARD) && !defined(SIMU_DISKIO)
|
||||
namespace simu {
|
||||
#include <dirent.h>
|
||||
}
|
||||
@@ -724,10 +724,10 @@ int32_t Card_state = SD_ST_MOUNTED;
|
||||
uint32_t Card_CSD[4]; // TODO elsewhere
|
||||
#endif
|
||||
|
||||
#endif // #if defined(SDCARD) && !defined(DISKIO_SIMU)
|
||||
#endif // #if defined(SDCARD) && !defined(SIMU_DISKIO)
|
||||
|
||||
|
||||
#if defined(DISKIO_SIMU)
|
||||
#if defined(SIMU_DISKIO)
|
||||
#include "FatFs/diskio.h"
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
@@ -908,7 +908,7 @@ uint32_t sdGetSpeed()
|
||||
return 330000;
|
||||
}
|
||||
|
||||
#endif // #if defined(DISKIO_SIMU)
|
||||
#endif // #if defined(SIMU_DISKIO)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ void delay_01us(uint16_t nb);
|
||||
#endif
|
||||
|
||||
// SD driver
|
||||
#if !defined(SIMU) || defined(DISKIO_SIMU)
|
||||
#if !defined(SIMU) || defined(SIMU_DISKIO)
|
||||
uint32_t sdIsHC();
|
||||
uint32_t sdGetSpeed();
|
||||
#define SD_IS_HC() (sdIsHC())
|
||||
|
||||
Reference in New Issue
Block a user