summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--extmod/fsusermount.c5
-rw-r--r--py/mpconfig.h5
-rw-r--r--stmhal/mpconfigport.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/extmod/fsusermount.c b/extmod/fsusermount.c
index 2fc24be1b2..8153a551cb 100644
--- a/extmod/fsusermount.c
+++ b/extmod/fsusermount.c
@@ -24,6 +24,9 @@
* THE SOFTWARE.
*/
+#include "py/mpconfig.h"
+#if MICROPY_FSUSERMOUNT
+
#include "py/nlr.h"
#include "py/runtime.h"
#include "lib/fatfs/ff.h"
@@ -110,3 +113,5 @@ STATIC mp_obj_t pyb_mount(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_KW(pyb_mount_obj, 2, pyb_mount);
+
+#endif // MICROPY_FSUSERMOUNT
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 1453560e08..686f90c25d 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -469,6 +469,11 @@ typedef double mp_float_t;
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (1)
#endif
+// Support for user-space VFS mount (selected ports)
+#ifndef MICROPY_FSUSERMOUNT
+#define MICROPY_FSUSERMOUNT (0)
+#endif
+
/*****************************************************************************/
/* Fine control over Python builtins, classes, modules, etc */
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h
index fec2c1236d..8a22ee4610 100644
--- a/stmhal/mpconfigport.h
+++ b/stmhal/mpconfigport.h
@@ -54,6 +54,7 @@
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_VOLUMES (3)
#define MICROPY_FATFS_MULTI_PARTITION (1)
+#define MICROPY_FSUSERMOUNT (1)
#define MICROPY_STREAMS_NON_BLOCK (1)
#define MICROPY_MODULE_WEAK_LINKS (1)