1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 10:03:50 +01:00

pkg/fatfs: support FF_FS_TINY=0

For increased performance it can be desireable to disable the tiny option.
The config option enables a per-file cache which increases the size
of `fatfs_file_desc_t`.
This commit is contained in:
Benjamin Valentin 2022-02-09 13:30:21 +01:00
parent ff39d5f388
commit 635016baf9

View File

@ -98,8 +98,15 @@ extern "C" {
* @{ * @{
*/ */
#ifdef MODULE_FATFS_VFS #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
#define FATFS_VFS_DIR_BUFFER_SIZE (44) #define FATFS_VFS_DIR_BUFFER_SIZE (44)
#define FATFS_VFS_FILE_BUFFER_SIZE (72) #define FATFS_VFS_FILE_BUFFER_SIZE (72 + _FATFS_FILE_CACHE)
#else #else
#define FATFS_VFS_DIR_BUFFER_SIZE (1) #define FATFS_VFS_DIR_BUFFER_SIZE (1)
#define FATFS_VFS_FILE_BUFFER_SIZE (1) #define FATFS_VFS_FILE_BUFFER_SIZE (1)