aboutsummaryrefslogtreecommitdiffstats
path: root/src/gfile/inc_fatfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gfile/inc_fatfs.c')
-rw-r--r--src/gfile/inc_fatfs.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gfile/inc_fatfs.c b/src/gfile/inc_fatfs.c
index 11df1055..b5eee725 100644
--- a/src/gfile/inc_fatfs.c
+++ b/src/gfile/inc_fatfs.c
@@ -5,10 +5,15 @@
* http://ugfx.org/license.html
*/
-/**
- * This file is included by src/gfile/gfile.c
- */
+/********************************************************
+ * The FATFS file-system
+ ********************************************************/
+
+#include "gfx.h"
+#if GFX_USE_GFILE && GFILE_NEED_FATFS
+
+#include "gfile_fs.h"
#include "fatfs_wrapper.h"
/********************************************************
@@ -35,8 +40,7 @@ static bool_t fatfsSync(GFILE* f);
static void fatfsFlClose(gfileList *pfl);
#endif
-static const GFILEVMT FsFatFSVMT = {
- GFILE_CHAINHEAD,
+const GFILEVMT FsFatFSVMT = {
GFSFLG_WRITEABLE | GFSFLG_SEEKABLE,
'F',
fatfsDel,
@@ -60,9 +64,6 @@ static const GFILEVMT FsFatFSVMT = {
#endif
};
-#undef GFILE_CHAINHEAD
-#define GFILE_CHAINHEAD &FsFatFSVMT
-
// Our directory list structure
typedef struct fatfsList {
gfileList fl; // This must be the first element.
@@ -319,3 +320,6 @@ static bool_t fatfsSync(GFILE *f)
}
#endif
+
+#endif //GFX_USE_GFILE && GFILE_NEED_FATFS
+