1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/fatfs: enable exFAT support

Enabling exFAT requires enabling long file names, so enable LFN if
exFAT is enabled.
exFAT (and LFN) also requires bumping the per-file/per-dir buffer.

Can be tested with

    CFLAGS += -DFATFS_FFCONF_OPT_FS_EXFAT=1
This commit is contained in:
Benjamin Valentin 2022-03-11 13:21:46 +01:00
parent 2c9811cc9e
commit 805bfc754a
2 changed files with 19 additions and 5 deletions

View File

@ -135,7 +135,7 @@
#ifndef FATFS_FFCONF_OPT_USE_LFN
#define FF_USE_LFN 0
#define FF_USE_LFN FF_FS_EXFAT
#else
#define FF_USE_LFN FATFS_FFCONF_OPT_USE_LFN
#endif

View File

@ -107,13 +107,27 @@ extern "C" {
#endif
#if FF_USE_FASTSEEK
#define _FATFS_FILE_SEEK_PTR (4)
#define _FATFS_FILE_SEEK_PTR (4)
#else
#define _FATFS_FILE_SEEK_PTR (0)
#define _FATFS_FILE_SEEK_PTR (0)
#endif
#define FATFS_VFS_DIR_BUFFER_SIZE (44)
#define FATFS_VFS_FILE_BUFFER_SIZE (72 + _FATFS_FILE_CACHE + _FATFS_FILE_SEEK_PTR)
#if FF_FS_EXFAT
#define _FATFS_FILE_EXFAT (44)
#define _FATFS_DIR_EXFAT (32)
#else
#define _FATFS_FILE_EXFAT (0)
#define _FATFS_DIR_EXFAT (0)
#endif
#if FF_USE_LFN
#define _FATFS_DIR_LFN (4)
#else
#define _FATFS_DIR_LFN (0)
#endif
#define FATFS_VFS_DIR_BUFFER_SIZE (44 + _FATFS_DIR_LFN + _FATFS_DIR_EXFAT)
#define FATFS_VFS_FILE_BUFFER_SIZE (72 + _FATFS_FILE_CACHE + _FATFS_FILE_SEEK_PTR + _FATFS_FILE_EXFAT)
#else
#define FATFS_VFS_DIR_BUFFER_SIZE (1)
#define FATFS_VFS_FILE_BUFFER_SIZE (1)