Some refactoring

This commit is contained in:
bsongis
2012-10-04 17:24:27 +00:00
parent 6ecf3375c2
commit 2b78b499f4
4 changed files with 15 additions and 11 deletions
-6
View File
@@ -34,7 +34,6 @@
#include "../open9x.h"
#if defined(SDCARD)
const char * audioFilenames[] = {
"inactiv",
"lowbatt",
@@ -67,8 +66,6 @@ const char * audioFilenames[] = {
uint32_t sdAvailableAudioFiles = 0;
// TODO enable the assert when it's C++
extern "C" {
void retrieveAvailableAudioFiles()
{
FILINFO info;
@@ -80,10 +77,8 @@ void retrieveAvailableAudioFiles()
char filename[32] = SYSTEM_SOUNDS_PATH "/";
#if !defined WIN32 && defined __GNUC__
assert(sizeof(audioFilenames)==AU_FRSKY_FIRST*sizeof(char *));
assert(sizeof(sdAvailableAudioFiles)*8 > AU_FRSKY_FIRST);
#endif
uint32_t availableAudioFiles = 0;
@@ -96,7 +91,6 @@ void retrieveAvailableAudioFiles()
sdAvailableAudioFiles = availableAudioFiles;
}
}
inline bool isAudioFileAvailable(uint8_t i, char * filename)
{
+4 -3
View File
@@ -615,7 +615,6 @@ static const char * sdCmd52(uint8_t wrFlag,
*status = HSMCI->HSMCI_RSPR[0];
return 0;
}
#endif
const char * sdSwReset(uint32_t retry)
{
@@ -629,6 +628,7 @@ const char * sdSwReset(uint32_t retry)
}
return result;
}
#endif
/**
* \brief Run the SD/MMC/SDIO Mode initialization sequence.
@@ -954,8 +954,9 @@ void sdInit()
#endif
uint8_t sdErrorCount = 0;
static FATFS g_FATFS_Obj = { 0 };
void retrieveAvailableAudioFiles();
FATFS g_FATFS_Obj = { 0 };
extern void retrieveAvailableAudioFiles();
void sdPoll10mS()
{