diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-08-17 00:54:37 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-08-17 00:54:37 +1000 |
commit | c06bff3304ed234c3a7f96fd049755ac59228ef7 (patch) | |
tree | 43d2494dcae6667654d76fa581070eac9e2a54b8 /src/gfile/inc_chibiosfs.c | |
parent | 5460a923ab25d27e522fe175563633665c477e02 (diff) | |
parent | 14075df6989eed0c60f34ac3eeee37ff002b0db8 (diff) | |
download | uGFX-c06bff3304ed234c3a7f96fd049755ac59228ef7.tar.gz uGFX-c06bff3304ed234c3a7f96fd049755ac59228ef7.tar.bz2 uGFX-c06bff3304ed234c3a7f96fd049755ac59228ef7.zip |
Merge branch 'master' into newmouse
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 |