From 434baf15c4efe1ecf030f6e57d6063ac7eb4caf6 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 22 Feb 2015 15:09:50 +0100 Subject: [PATCH] Re #2026: DISKIO_SIMU renamed to SIMU_DISKIO --- radio/src/Makefile | 6 +++--- radio/src/sdcard.cpp | 6 +++--- radio/src/targets/simu/simpgmspace.cpp | 14 +++++++------- radio/src/targets/taranis/board_taranis.h | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/radio/src/Makefile b/radio/src/Makefile index 7424263a5..a11ce208a 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -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 diff --git a/radio/src/sdcard.cpp b/radio/src/sdcard.cpp index 8e68ed1f5..a05763c9d 100644 --- a/radio/src/sdcard.cpp +++ b/radio/src/sdcard.cpp @@ -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) \ No newline at end of file +#endif // #if !defined(SIMU) || defined(SIMU_DISKIO) diff --git a/radio/src/targets/simu/simpgmspace.cpp b/radio/src/targets/simu/simpgmspace.cpp index f8bafc871..2150bfc93 100644 --- a/radio/src/targets/simu/simpgmspace.cpp +++ b/radio/src/targets/simu/simpgmspace.cpp @@ -47,7 +47,7 @@ #include #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 } @@ -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 #include @@ -908,7 +908,7 @@ uint32_t sdGetSpeed() return 330000; } -#endif // #if defined(DISKIO_SIMU) +#endif // #if defined(SIMU_DISKIO) diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index 6aca730ce..c35f0aecb 100644 --- a/radio/src/targets/taranis/board_taranis.h +++ b/radio/src/targets/taranis/board_taranis.h @@ -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())