diff options
| author | cooljqln <cooljqln@noreply.codeberg.org> | 2025-08-04 03:39:45 +0200 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2025-08-04 03:39:45 +0200 |
| commit | fd064b996a432074b3e5c18b6a8c5439a372f281 (patch) | |
| tree | 4e3b2880e11f3169000d4273323399677af8c05f /lib/fatfs/src/ffconf.h | |
| parent | df8fc4104e5ed884f3b52257558191955375d1e7 (diff) | |
| parent | f4eea3a18add40b84ea2494970ef5945c755f578 (diff) | |
| download | tangara-fw-fd064b996a432074b3e5c18b6a8c5439a372f281.tar.gz | |
Merge pull request 'Update esp-idf to the v5.5' (#418) from jqln/idfv5.5 into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/418
Diffstat (limited to 'lib/fatfs/src/ffconf.h')
| -rw-r--r-- | lib/fatfs/src/ffconf.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/lib/fatfs/src/ffconf.h b/lib/fatfs/src/ffconf.h index a5a4ae17..d378ee6d 100644 --- a/lib/fatfs/src/ffconf.h +++ b/lib/fatfs/src/ffconf.h @@ -1,3 +1,6 @@ +#ifndef _FFCONF_DEFINED +#define _FFCONF_DEFINED + #include "sdkconfig.h" /*---------------------------------------------------------------------------/ @@ -40,7 +43,7 @@ /* This option switches fast seek function. (0:Disable or 1:Enable) */ -#define FF_USE_EXPAND 0 +#define FF_USE_EXPAND 1 /* This option switches f_expand function. (0:Disable or 1:Enable) */ @@ -57,11 +60,36 @@ #define FF_USE_FORWARD 1 /* This option switches f_forward() function. (0:Disable or 1:Enable) */ +#if defined(CONFIG_FATFS_USE_STRFUNC_WITHOUT_CRLF_CONV) +#define FF_USE_STRFUNC 1 +#elif defined(CONFIG_FATFS_USE_STRFUNC_WITH_CRLF_CONV) +#define FF_USE_STRFUNC 2 +#else /* CONFIG_FATFS_USE_STRFUNC_NONE */ +#define FF_USE_STRFUNC 0 +#endif -#define FF_USE_STRFUNC 1 +#ifdef CONFIG_FATFS_PRINT_LLI +#define FF_PRINT_LLI 1 +#else #define FF_PRINT_LLI 0 +#endif + +#ifdef CONFIG_FATFS_PRINT_FLOAT +#define FF_PRINT_FLOAT 1 +#else #define FF_PRINT_FLOAT 0 +#endif + +#if defined(CONFIG_FATFS_STRF_ENCODE_ANSI) +#define FF_STRF_ENCODE 0 +#elif defined(CONFIG_FATFS_STRF_ENCODE_UTF16LE) +#define FF_STRF_ENCODE 1 +#elif defined(CONFIG_FATFS_STRF_ENCODE_UTF16BE) +#define FF_STRF_ENCODE 2 +#else /* CONFIG_FATFS_STRF_ENCODE_UTF8 */ #define FF_STRF_ENCODE 3 +#endif + /* FF_USE_STRFUNC switches string functions, f_gets(), f_putc(), f_puts() and / f_printf(). / @@ -271,7 +299,7 @@ / These options have no effect in read-only configuration (FF_FS_READONLY = 1). */ -#define FF_FS_NOFSINFO 0 +#define FF_FS_NOFSINFO (CONFIG_FATFS_DONT_TRUST_FREE_CLUSTER_CNT << 0 | CONFIG_FATFS_DONT_TRUST_LAST_ALLOC << 1) /* If you need to know correct free space on the FAT32 volume, set bit 0 of this / option, and f_getfree() function at the first time after volume mount will force / a full FAT scan. Bit 1 controls the use of last allocated cluster number. @@ -311,6 +339,13 @@ / The FF_FS_TIMEOUT defines timeout period in unit of O/S time tick. */ +#define FF_USE_DYN_BUFFER CONFIG_FATFS_USE_DYN_BUFFERS +/* The option FF_USE_DYN_BUFFER controls source of size used for buffers in the FS and FIL objects. +/ +/ 0: Disable dynamic buffer size and use static size buffers defined by FF_MAX_SS. +/ 1: Enable dynamic buffer size and use ff_memmalloc() to allocate buffers. +*/ + #include <sys/param.h> #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" @@ -330,3 +365,5 @@ void ff_memfree(void*); #define disk_read ff_disk_read #define disk_write ff_disk_write #define disk_ioctl ff_disk_ioctl + +#endif /* _FFCONF_DEFINED */ |
