Skip to content

Commit f0fbab7

Browse files
committed
extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.
1 parent 3a1bbcc commit f0fbab7

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

extmod/fsusermount.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
* THE SOFTWARE.
2525
*/
2626

27+
#include "py/mpconfig.h"
28+
#if MICROPY_FSUSERMOUNT
29+
2730
#include "py/nlr.h"
2831
#include "py/runtime.h"
2932
#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 *
110113
return mp_const_none;
111114
}
112115
MP_DEFINE_CONST_FUN_OBJ_KW(pyb_mount_obj, 2, pyb_mount);
116+
117+
#endif // MICROPY_FSUSERMOUNT

py/mpconfig.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ typedef double mp_float_t;
469469
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (1)
470470
#endif
471471

472+
// Support for user-space VFS mount (selected ports)
473+
#ifndef MICROPY_FSUSERMOUNT
474+
#define MICROPY_FSUSERMOUNT (0)
475+
#endif
476+
472477
/*****************************************************************************/
473478
/* Fine control over Python builtins, classes, modules, etc */
474479

stmhal/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#define MICROPY_FATFS_RPATH (2)
5555
#define MICROPY_FATFS_VOLUMES (3)
5656
#define MICROPY_FATFS_MULTI_PARTITION (1)
57+
#define MICROPY_FSUSERMOUNT (1)
5758

5859
#define MICROPY_STREAMS_NON_BLOCK (1)
5960
#define MICROPY_MODULE_WEAK_LINKS (1)

0 commit comments

Comments
 (0)