fs: fatfs: additional ELM FAT options
Make additional ELM FAT library options configurable to the user. Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
4235dbfd2b
commit
a1d6f8081a
|
@ -89,7 +89,11 @@
|
|||
#define FF_FS_TINY 1
|
||||
|
||||
#undef FF_FS_NORTC
|
||||
#if defined(CONFIG_FS_FATFS_HAS_RTC)
|
||||
#define FF_FS_NORTC 0
|
||||
#else
|
||||
#define FF_FS_NORTC 1
|
||||
#endif /* defined(CONFIG_FS_FATFS_HAS_RTC) */
|
||||
|
||||
/* Zephyr uses FF_VOLUME_STRS */
|
||||
#undef FF_STR_VOLUME_ID
|
||||
|
@ -104,6 +108,15 @@
|
|||
#undef FF_VOLUMES
|
||||
#define FF_VOLUMES 8
|
||||
|
||||
#if defined(CONFIG_FS_FATFS_EXTRA_NATIVE_API)
|
||||
#undef FF_USE_LABEL
|
||||
#undef FF_USE_EXPAND
|
||||
#undef FF_USE_FIND
|
||||
#define FF_USE_LABEL 1
|
||||
#define FF_USE_EXPAND 1
|
||||
#define FF_USE_FIND 1
|
||||
#endif /* defined(CONFIG_FS_FATFS_EXTRA_NATIVE_API) */
|
||||
|
||||
/*
|
||||
* Options provided below have been added to ELM FAT source code to
|
||||
* support Zephyr specific features, and are not part of ffconf.h.
|
||||
|
|
|
@ -89,6 +89,30 @@ config FS_FATFS_NUM_DIRS
|
|||
at compile-time.
|
||||
This affects use of fs_opendir on FAT type mounted file systems.
|
||||
|
||||
config FS_FATFS_HAS_RTC
|
||||
bool "Timestamping support"
|
||||
help
|
||||
Enable file system timestamping instead of using a hardcoded date
|
||||
for all operations. Requires an application supplied implementation
|
||||
of `get_fattime`. Format of the uint32_t bits are as follows:
|
||||
31:25 = Year from 1980
|
||||
24:21 = Month (1..12)
|
||||
20:16 = Day of month (1..31)
|
||||
15:11 = Hour (0..23)
|
||||
10: 5 = Minute (0..59)
|
||||
4: 0 = Seconds/2 (0..29)
|
||||
|
||||
config FS_FATFS_EXTRA_NATIVE_API
|
||||
bool "Additional native API functions"
|
||||
help
|
||||
Enable the following additional native API functions that do not have
|
||||
an equivalent in the Zephyr VFS API:
|
||||
* `f_getlabel`
|
||||
* `f_setlabel`
|
||||
* `f_expand`
|
||||
* `f_findfirst`
|
||||
* `f_findnext`
|
||||
|
||||
config FS_FATFS_LFN
|
||||
bool "Long filenames (LFN)"
|
||||
help
|
||||
|
|
Loading…
Reference in New Issue