Add support for GFILE_PETITFS_EXTERNAL_LIB and GFILE_FATFS_EXTERNAL_LIB
This commit is contained in:
parent
08c639ecf6
commit
f8dac95e93
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
*** Changes after 2.5 ***
|
*** Changes after 2.5 ***
|
||||||
FIX: Fixing bug where the list item count wasn't decremented when an item was removed
|
FIX: Fixing bug where the list item count wasn't decremented when an item was removed
|
||||||
|
FEATURE: Add options GFILE_FATFS_EXTERNAL_LIB and GFILE_PETITFSFS_EXTERNAL_LIB
|
||||||
|
|
||||||
|
|
||||||
*** Release 2.5 ***
|
*** Release 2.5 ***
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "../../gfx.h"
|
#include "../../gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_GFILE && GFILE_NEED_FATFS && GFX_USE_OS_CHIBIOS
|
#if GFX_USE_GFILE && GFILE_NEED_FATFS && GFX_USE_OS_CHIBIOS && !GFILE_FATFS_EXTERNAL_LIB
|
||||||
|
|
||||||
#include "gfile_fatfs_wrapper.h"
|
#include "gfile_fatfs_wrapper.h"
|
||||||
|
|
||||||
@ -249,6 +249,6 @@ DWORD get_fattime(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GFX_USE_GFILE && GFILE_NEED_FATFS && GFX_USE_OS_CHIBIOS
|
#endif // GFX_USE_GFILE && GFILE_NEED_FATFS && GFX_USE_OS_CHIBIOS && !GFILE_FATFS_EXTERNAL_LIB
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "../../gfx.h"
|
#include "../../gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_GFILE && GFILE_NEED_FATFS
|
#if GFX_USE_GFILE && GFILE_NEED_FATFS && !GFILE_FATFS_EXTERNAL_LIB
|
||||||
|
|
||||||
#include "gfile_fatfs_wrapper.h"
|
#include "gfile_fatfs_wrapper.h"
|
||||||
|
|
||||||
@ -80,4 +80,4 @@
|
|||||||
}
|
}
|
||||||
#endif /* _USE_LFN == 3 */
|
#endif /* _USE_LFN == 3 */
|
||||||
|
|
||||||
#endif // GFX_USE_GFILE && GFILE_NEED_FATFS
|
#endif // GFX_USE_GFILE && GFILE_NEED_FATFS && !GFILE_FATFS_EXTERNAL_LIB
|
||||||
|
@ -201,6 +201,31 @@
|
|||||||
#ifndef GFILE_MAX_GFILES
|
#ifndef GFILE_MAX_GFILES
|
||||||
#define GFILE_MAX_GFILES 3
|
#define GFILE_MAX_GFILES 3
|
||||||
#endif
|
#endif
|
||||||
|
/**
|
||||||
|
* @brief TUse an external FATFS library instead of the uGFX inbuilt one
|
||||||
|
* @note This is applicable when GFILE_NEED_FATFS is specified. It allows
|
||||||
|
* the programmer to use their own FATFS implementation provided the
|
||||||
|
* api matches the fatfs-0.10b API.
|
||||||
|
* @note The users ffconf.h file still needs to be reachable when compiling uGFX.
|
||||||
|
* @note If ffconf.h contains _FS_REENTRANT as true then the user provided simpleton
|
||||||
|
* routines must be compatible with uGFX threading.
|
||||||
|
* @note If ffconf.h contains _USE_LFN == 3 then the user provided simpleton routines must
|
||||||
|
* be compatible with uGFX memory management.
|
||||||
|
*/
|
||||||
|
#ifndef GFILE_FATFS_EXTERNAL_LIB
|
||||||
|
#define GFILE_FATFS_EXTERNAL_LIB FALSE
|
||||||
|
#endif
|
||||||
|
/**
|
||||||
|
* @brief TUse an external PETITFS library instead of the uGFX inbuilt one
|
||||||
|
* @note This is applicable when GFILE_NEED_PETITFS is specified. It allows
|
||||||
|
* the programmer to use their own FATFS implementation provided the
|
||||||
|
* api matches the petitfs-0.03 API.
|
||||||
|
* @note The users pffconf.h file still needs to be reachable when compiling uGFX.
|
||||||
|
*/
|
||||||
|
#ifndef GFILE_PETITFS_EXTERNAL_LIB
|
||||||
|
#define GFILE_PETITFS_EXTERNAL_LIB FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#endif /* _GFILE_OPTIONS_H */
|
#endif /* _GFILE_OPTIONS_H */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "../../gfx.h"
|
#include "../../gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_GFILE && GFILE_NEED_PETITFS && GFX_USE_OS_CHIBIOS
|
#if GFX_USE_GFILE && GFILE_NEED_PETITFS && GFX_USE_OS_CHIBIOS && !GFILE_PETITFS_EXTERNAL_LIB
|
||||||
|
|
||||||
#include "gfile_petitfs_wrapper.h"
|
#include "gfile_petitfs_wrapper.h"
|
||||||
|
|
||||||
@ -77,6 +77,6 @@ DRESULT disk_readp (
|
|||||||
return RES_OK;
|
return RES_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GFX_USE_GFILE && GFILE_NEED_PETITFS && GFX_USE_OS_CHIBIOS
|
#endif // GFX_USE_GFILE && GFILE_NEED_PETITFS && GFX_USE_OS_CHIBIOS && !GFILE_PETITFS_EXTERNAL_LIB
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
#include "../../gfx.h"
|
#include "../../gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_GFILE && GFILE_NEED_PETITFS
|
#if GFX_USE_GFILE && GFILE_NEED_PETITFS && !GFILE_PETITFS_EXTERNAL_LIB
|
||||||
|
|
||||||
#include "gfile_petitfs_wrapper.h"
|
#include "gfile_petitfs_wrapper.h"
|
||||||
|
|
||||||
// Include the source we want
|
// Include the source we want
|
||||||
#include "../../3rdparty/petitfs-0.03/src/pff.c"
|
#include "../../3rdparty/petitfs-0.03/src/pff.c"
|
||||||
|
|
||||||
#endif // GFX_USE_GFILE && GFILE_NEED_PETITFS
|
#endif // GFX_USE_GFILE && GFILE_NEED_PETITFS && !GFILE_PETITFS_EXTERNAL_LIB
|
||||||
|
Loading…
Reference in New Issue
Block a user