Re #2026: DISKIO_SIMU renamed to SIMU_DISKIO

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