summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2020-07-23 19:34:21 +0200
committerDamien George <damien@micropython.org>2021-08-08 23:09:26 +1000
commitc9b72ba69418eb91595698182022f64c24d64556 (patch)
tree78912779b2e93f10a76ec5d8d0e7fbe0867e681c
parentb40dfa961dcd9c3504f742c212248444b68413b3 (diff)
nrf/mpconfigport.h: Tune FAT FS configuration.
Disable MICROPY_FATFS_MULTI_PARTITION configuration because there is no partition table in the flash for FATFS to read. Also, set MICROPY_FATFS_MAX_SS to the size of a flash page. For nrf51 the value 1024 is set. For nrf52/nrf91 the value 4096 is set.
-rw-r--r--ports/nrf/mpconfigport.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index d1e9665de..92b87a036 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -75,7 +75,13 @@
#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_FATFS_USE_LABEL (1)
#define MICROPY_FATFS_RPATH (2)
-#define MICROPY_FATFS_MULTI_PARTITION (1)
+#define MICROPY_FATFS_MULTI_PARTITION (0)
+
+#if NRF51
+ #define MICROPY_FATFS_MAX_SS (1024)
+#else
+ #define MICROPY_FATFS_MAX_SS (4096)
+#endif
// TODO these should be generic, not bound to fatfs
#define mp_type_fileio fatfs_type_fileio