From 72085a669babf83774716e21f6191bf2f84936a5 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 15 Feb 2016 00:02:03 +0200 Subject: [PATCH] py/mpstate.h: fs_user_mount is now standard, reusable uPy functionality. --- py/mpstate.h | 5 +++++ stmhal/mpconfigport.h | 3 --- unix/mpconfigport.h | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/py/mpstate.h b/py/mpstate.h index a990713f76..7f8325b9a8 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -136,6 +136,11 @@ typedef struct _mp_state_vm_t { mp_obj_t lwip_slip_stream; #endif + #if MICROPY_FSUSERMOUNT + // for user-mountable block device (max fixed at compile time) + struct _fs_user_mount_t *fs_user_mount[MICROPY_FATFS_VOLUMES]; + #endif + // // END ROOT POINTER SECTION //////////////////////////////////////////////////////////// diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h index 8d12397361..9412903676 100644 --- a/stmhal/mpconfigport.h +++ b/stmhal/mpconfigport.h @@ -183,9 +183,6 @@ extern const struct _mp_obj_module_t mp_module_network; /* pointers to all CAN objects (if they have been created) */ \ struct _pyb_can_obj_t *pyb_can_obj_all[2]; \ \ - /* for user-mountable block device (max fixed at compile time) */ \ - struct _fs_user_mount_t *fs_user_mount[MICROPY_FATFS_VOLUMES]; \ - \ /* list of registered NICs */ \ mp_obj_list_t mod_network_nic_list; \ diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 719f600993..024f65b744 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -264,8 +264,6 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj; #define MICROPY_PORT_ROOT_POINTERS \ const char *readline_hist[50]; \ mp_obj_t keyboard_interrupt_obj; \ - /* for user-mountable block device (max fixed at compile time) */ \ - struct _fs_user_mount_t *fs_user_mount[MICROPY_FATFS_VOLUMES]; \ void *mmap_region_head; \ // We need to provide a declaration/definition of alloca()