From 13a4c120ce2cdeb5aa1c210d9426d31e02898486 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 9 Feb 2016 14:31:26 +0000 Subject: lib/fatfs: Add support for sector sizes larger than 512 bytes. If MICROPY_FATFS_MAX_SS is defined to power of 2 value between 1024 and 4096, support for dynamic sector size in FatFs will be enabled. Note that FatFs reserves static buffer of MICROPY_FATFS_MAX_SS size for each filesystem in use, so that value should be set sparingly. Initial patch provided by @pfalcon. --- lib/fatfs/ffconf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/fatfs/ffconf.h b/lib/fatfs/ffconf.h index 27e73e2b3..7bfb03add 100644 --- a/lib/fatfs/ffconf.h +++ b/lib/fatfs/ffconf.h @@ -217,7 +217,11 @@ #define _MIN_SS 512 +#ifdef MICROPY_FATFS_MAX_SS +#define _MAX_SS (MICROPY_FATFS_MAX_SS) +#else #define _MAX_SS 512 +#endif /* These options configure the range of sector size to be supported. (512, 1024, / 2048 or 4096) Always set both 512 for most systems, all type of memory cards and / harddisk. But a larger value may be required for on-board flash memory and some -- cgit v1.2.3