diff options
Diffstat (limited to 'src/gfile/inc_chibiosfs.c')
-rw-r--r-- | src/gfile/inc_chibiosfs.c | 17 |
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 |