]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - LinuxGUI/Ventoy2Disk/Lib/fat_io_lib/fat_opts.h
Edited! (#2105)
[Ventoy.git] / LinuxGUI / Ventoy2Disk / Lib / fat_io_lib / fat_opts.h
1 #ifndef __FAT_OPTS_H__
2 #define __FAT_OPTS_H__
3
4 #ifdef FATFS_USE_CUSTOM_OPTS_FILE
5 #include "fat_custom.h"
6 #endif
7
8 //-------------------------------------------------------------
9 // Configuration
10 //-------------------------------------------------------------
11
12 // Is the processor little endian (1) or big endian (0)
13 #ifndef FATFS_IS_LITTLE_ENDIAN
14 #define FATFS_IS_LITTLE_ENDIAN 1
15 #endif
16
17 // Max filename Length
18 #ifndef FATFS_MAX_LONG_FILENAME
19 #define FATFS_MAX_LONG_FILENAME 260
20 #endif
21
22 // Max open files (reduce to lower memory requirements)
23 #ifndef FATFS_MAX_OPEN_FILES
24 #define FATFS_MAX_OPEN_FILES 2
25 #endif
26
27 // Number of sectors per FAT_BUFFER (min 1)
28 #ifndef FAT_BUFFER_SECTORS
29 #define FAT_BUFFER_SECTORS 1
30 #endif
31
32 // Max FAT sectors to buffer (min 1)
33 // (mem used is FAT_BUFFERS * FAT_BUFFER_SECTORS * FAT_SECTOR_SIZE)
34 #ifndef FAT_BUFFERS
35 #define FAT_BUFFERS 1
36 #endif
37
38 // Size of cluster chain cache (can be undefined)
39 // Mem used = FAT_CLUSTER_CACHE_ENTRIES * 4 * 2
40 // Improves access speed considerably
41 //#define FAT_CLUSTER_CACHE_ENTRIES 128
42
43 // Include support for writing files (1 / 0)?
44 #ifndef FATFS_INC_WRITE_SUPPORT
45 #define FATFS_INC_WRITE_SUPPORT 1
46 #endif
47
48 // Support long filenames (1 / 0)?
49 // (if not (0) only 8.3 format is supported)
50 #ifndef FATFS_INC_LFN_SUPPORT
51 #define FATFS_INC_LFN_SUPPORT 1
52 #endif
53
54 // Support directory listing (1 / 0)?
55 #ifndef FATFS_DIR_LIST_SUPPORT
56 #define FATFS_DIR_LIST_SUPPORT 1
57 #endif
58
59 // Support time/date (1 / 0)?
60 #ifndef FATFS_INC_TIME_DATE_SUPPORT
61 #define FATFS_INC_TIME_DATE_SUPPORT 0
62 #endif
63
64 // Include support for formatting disks (1 / 0)?
65 #ifndef FATFS_INC_FORMAT_SUPPORT
66 #define FATFS_INC_FORMAT_SUPPORT 0
67 #endif
68
69 // Sector size used
70 #define FAT_SECTOR_SIZE 512
71
72 // Printf output (directory listing / debug)
73 #ifndef FAT_PRINTF
74 void ventoy_syslog_printf(const char *Fmt, ...);
75 #define FAT_PRINTF(a) ventoy_syslog_printf a
76 #endif
77
78 // Time/Date support requires time.h
79 #if FATFS_INC_TIME_DATE_SUPPORT
80 #include <time.h>
81 #endif
82
83 #endif