Some SD-card work for the ARM board (high level)
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include "ff.h"
|
||||
|
||||
char g_logFilename[21]; // "/O9XLOGS/M00_000.CSV\0" max required length = 21
|
||||
FATFS g_FATFS_Obj;
|
||||
FATFS g_FATFS_Obj; // TODO not here
|
||||
FIL g_oLogFile;
|
||||
int8_t g_logState = 0; // 0=closed, >0=opened, <0=error
|
||||
const pm_char * g_logError = NULL;
|
||||
@@ -128,14 +128,6 @@ void initLogs()
|
||||
// g_logFilename should now be set appropriately.
|
||||
}
|
||||
|
||||
const pm_char *SDCARD_ERROR(FRESULT result)
|
||||
{
|
||||
if (result == FR_NOT_READY)
|
||||
return STR_NO_SDCARD;
|
||||
else
|
||||
return STR_SDCARD_ERROR;
|
||||
}
|
||||
|
||||
void writeLogs()
|
||||
{
|
||||
FRESULT result;
|
||||
|
||||
+10
-1
@@ -35,7 +35,10 @@
|
||||
#define sdcard_h
|
||||
|
||||
#include "ff.h"
|
||||
#if defined(PCBV4)
|
||||
// TODO because this file is used for ersky9x
|
||||
#include "rtc.h"
|
||||
#endif
|
||||
#include "gtime.h"
|
||||
|
||||
#define LOGS_PATH "/9XLOGS" // no trailing slash = important
|
||||
@@ -50,7 +53,13 @@ extern FIL g_oLogFile;
|
||||
extern void initLogs();
|
||||
extern void writeLogs();
|
||||
|
||||
const pm_char *SDCARD_ERROR(FRESULT result);
|
||||
const pm_char *SDCARD_ERROR(FRESULT result)
|
||||
{
|
||||
if (result == FR_NOT_READY)
|
||||
return STR_NO_SDCARD;
|
||||
else
|
||||
return STR_SDCARD_ERROR;
|
||||
}
|
||||
|
||||
// MM/SD card Disk IO Support
|
||||
extern void disk_timerproc(void);
|
||||
|
||||
Reference in New Issue
Block a user