aboutsummaryrefslogtreecommitdiffstats
path: root/src/gfile/inc_chibiosfs.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-08-15 00:31:32 +1000
committerinmarket <andrewh@inmarket.com.au>2014-08-15 00:31:32 +1000
commit1105e38414fff26d6b1e278ee3bf19b9b981299c (patch)
tree0492188b192ddddc83595e55e18981dfb01a1fd5 /src/gfile/inc_chibiosfs.c
parenta588740dc3005972892ba7d39d35d1228bc5f0aa (diff)
downloaduGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.gz
uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.tar.bz2
uGFX-1105e38414fff26d6b1e278ee3bf19b9b981299c.zip
Separate GFILE into separate source files to prevent future name and include file conflicts.
Diffstat (limited to 'src/gfile/inc_chibiosfs.c')
-rw-r--r--src/gfile/inc_chibiosfs.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gfile/inc_chibiosfs.c b/src/gfile/inc_chibiosfs.c
index 13ae6cac..72826e28 100644
--- a/src/gfile/inc_chibiosfs.c
+++ b/src/gfile/inc_chibiosfs.c
@@ -5,14 +5,16 @@
* http://ugfx.org/license.html
*/
-/**
- * This file is included by src/gfile/gfile.c
- */
-
/********************************************************
- * The ChibiOS BaseFileStream file-system VMT
+ * The ChibiOS BaseFileStream file-system
********************************************************/
+#include "gfx.h"
+
+#if GFX_USE_GFILE && GFILE_NEED_CHIBIOSFS && GFX_USE_OS_CHIBIOS
+
+#include "gfile_fs.h"
+
static void ChibiOSBFSClose(GFILE *f);
static int ChibiOSBFSRead(GFILE *f, void *buf, int size);
static int ChibiOSBFSWrite(GFILE *f, const void *buf, int size);
@@ -21,7 +23,6 @@ static long int ChibiOSBFSGetsize(GFILE *f);
static bool_t ChibiOSBFSEof(GFILE *f);
static const GFILEVMT FsCHIBIOSVMT = {
- 0, // next
GFSFLG_SEEKABLE|GFSFLG_WRITEABLE, // flags
0, // prefix
0, 0, 0, 0,
@@ -53,7 +54,7 @@ GFILE * gfileOpenBaseFileStream(void *BaseFileStreamPtr, const char *mode) {
GFILE * f;
// Get an empty file and set the flags
- if (!(f = findemptyfile(mode)))
+ if (!(f = _gfileFindSlot(mode)))
return 0;
// File is open - fill in all the details
@@ -63,3 +64,5 @@ GFILE * gfileOpenBaseFileStream(void *BaseFileStreamPtr, const char *mode) {
f->flags |= GFILEFLG_OPEN|GFILEFLG_CANSEEK;
return f;
}
+
+#endif //GFX_USE_GFILE && GFILE_NEED_CHIBIOSFS && GFX_USE_OS_CHIBIOS