mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #17631 from benpicco/pkg/fatfs-non_tiny
pkg/fatfs_vfs: support FF_FS_TINY=0
This commit is contained in:
commit
51e47e70cb
@ -1,6 +1,8 @@
|
||||
INCLUDES += -I$(PKGDIRBASE)
|
||||
INCLUDES += -I$(RIOTPKG)/fatfs/fatfs_diskio/mtd/include
|
||||
INCLUDES += -I$(RIOTPKG)/fatfs/vendor/include
|
||||
# native overwrites all INCLUDES
|
||||
NATIVEINCLUDES += -I$(RIOTPKG)/fatfs/vendor/include
|
||||
|
||||
DIRS += $(RIOTBASE)/pkg/fatfs/fatfs_diskio/mtd
|
||||
|
||||
|
@ -4,4 +4,19 @@
|
||||
* @ingroup sys_fs
|
||||
* @brief Provides FAT file system support
|
||||
* @see http://elm-chan.org/fsw/ff/00index_e.html
|
||||
*/
|
||||
*/
|
||||
|
||||
# Compile-Time options
|
||||
|
||||
- `FATFS_FFCONF_OPT_FS_READONLY`: This option switches read-only configuration.
|
||||
Read-only configuration removes writing API functions.
|
||||
|
||||
- `FATFS_FFCONF_OPT_USE_FASTSEEK`: Enables faster seek at the cost of some per-fd RAM.
|
||||
|
||||
- `FATFS_FFCONF_OPT_FS_TINY`: Memory optimisations. Disabling this will increase FS performance
|
||||
at the cost of higher per-FD RAM usage (+512 byte/fd) as well as
|
||||
increased stack usage.
|
||||
|
||||
- `FATFS_FFCONF_OPT_FS_EXFAT`: enables support for exFAT
|
||||
|
||||
- `FATFS_FFCONF_OPT_USE_LFN`: enables support for long file names
|
||||
|
@ -87,6 +87,11 @@ static int _format(vfs_mount_t *mountp)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* make sure the volume has been initialized */
|
||||
if (_init(mountp)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
const MKFS_PARM param = {
|
||||
.fmt = CONFIG_FATFS_FORMAT_TYPE,
|
||||
};
|
||||
|
@ -98,8 +98,22 @@ extern "C" {
|
||||
* @{
|
||||
*/
|
||||
#ifdef MODULE_FATFS_VFS
|
||||
#include "ffconf.h"
|
||||
|
||||
#if FF_FS_TINY
|
||||
#define _FATFS_FILE_CACHE (0)
|
||||
#else
|
||||
#define _FATFS_FILE_CACHE FF_MAX_SS
|
||||
#endif
|
||||
|
||||
#if FF_USE_FASTSEEK
|
||||
#define _FATFS_FILE_SEEK_PTR (4)
|
||||
#else
|
||||
#define _FATFS_FILE_SEEK_PTR (0)
|
||||
#endif
|
||||
|
||||
#define FATFS_VFS_DIR_BUFFER_SIZE (44)
|
||||
#define FATFS_VFS_FILE_BUFFER_SIZE (72)
|
||||
#define FATFS_VFS_FILE_BUFFER_SIZE (72 + _FATFS_FILE_CACHE + _FATFS_FILE_SEEK_PTR)
|
||||
#else
|
||||
#define FATFS_VFS_DIR_BUFFER_SIZE (1)
|
||||
#define FATFS_VFS_FILE_BUFFER_SIZE (1)
|
||||
|
Loading…
Reference in New Issue
Block a user