summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-01-12 12:33:15 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-01-12 12:46:44 -0800
commit9ece7c907dc8bfc7487fc33242e8b52f15879dc7 (patch)
treee8f7d4dc3b87757a3f020e585681f4ac9f5deae3 /py/runtime.c
parent0d408488c5d328ac45bcb276d444089f0c297cf4 (diff)
Add persistent VFS shares so that the devices can be used with USB
that is present across soft-reset.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index cd02debf8..c407a58a4 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -103,7 +103,8 @@ void mp_init(void) {
#if MICROPY_FSUSERMOUNT
// zero out the pointers to the user-mounted devices
- memset(MP_STATE_VM(fs_user_mount), 0, sizeof(MP_STATE_VM(fs_user_mount)));
+ memset(MP_STATE_VM(fs_user_mount) + MICROPY_FATFS_NUM_PERSISTENT, 0,
+ sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT);
#endif
#if MICROPY_PY_THREAD_GIL