diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-25 00:43:11 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-25 13:19:36 +0200 |
commit | 3a1bbcc2ef46bbab90ef3cde88dfcd8810e71d74 (patch) | |
tree | 7267596d43606e8bd6b22eea57d580ce2dcb9280 | |
parent | c8437f97ae1b9849bbb8e3abbf82a832cc901622 (diff) | |
download | micropython-3a1bbcc2ef46bbab90ef3cde88dfcd8810e71d74.tar.gz micropython-3a1bbcc2ef46bbab90ef3cde88dfcd8810e71d74.zip |
extmod: Move fsusermount.c from stmhal for cross-port reuse.
-rw-r--r-- | extmod/fsusermount.c (renamed from stmhal/fsusermount.c) | 0 | ||||
-rw-r--r-- | extmod/fsusermount.h (renamed from stmhal/fsusermount.h) | 0 | ||||
-rw-r--r-- | py/builtin.h | 3 | ||||
-rw-r--r-- | py/py.mk | 1 | ||||
-rw-r--r-- | stmhal/Makefile | 1 | ||||
-rw-r--r-- | stmhal/diskio.c | 2 | ||||
-rw-r--r-- | stmhal/ffconf.c | 2 | ||||
-rw-r--r-- | stmhal/modpyb.c | 2 | ||||
-rw-r--r-- | stmhal/moduos.c | 2 |
9 files changed, 8 insertions, 5 deletions
diff --git a/stmhal/fsusermount.c b/extmod/fsusermount.c index 2fc24be1b2..2fc24be1b2 100644 --- a/stmhal/fsusermount.c +++ b/extmod/fsusermount.c diff --git a/stmhal/fsusermount.h b/extmod/fsusermount.h index a6f54b878e..a6f54b878e 100644 --- a/stmhal/fsusermount.h +++ b/extmod/fsusermount.h diff --git a/py/builtin.h b/py/builtin.h index 891b93e9a5..5653c48d30 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -105,4 +105,7 @@ extern const mp_obj_module_t mp_module_ussl; extern const mp_obj_module_t mp_module_machine; extern const mp_obj_module_t mp_module_lwip; +// extmod functions +MP_DECLARE_CONST_FUN_OBJ(pyb_mount_obj); + #endif // __MICROPY_INCLUDED_PY_BUILTIN_H__ @@ -167,6 +167,7 @@ PY_O_BASENAME = \ ../extmod/modubinascii.o \ ../extmod/modmachine.o \ ../extmod/modussl.o \ + ../extmod/fsusermount.o \ # prepend the build destination prefix to the py object files PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME)) diff --git a/stmhal/Makefile b/stmhal/Makefile index de41d9261f..1e8af39876 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -153,7 +153,6 @@ SRC_C = \ storage.c \ file.c \ sdcard.c \ - fsusermount.c \ diskio.c \ ffconf.c \ lcd.c \ diff --git a/stmhal/diskio.c b/stmhal/diskio.c index 8c8c8ee15b..6d0a8b40cd 100644 --- a/stmhal/diskio.c +++ b/stmhal/diskio.c @@ -38,7 +38,7 @@ #include "rtc.h" #include "storage.h" #include "sdcard.h" -#include "fsusermount.h" +#include "extmod/fsusermount.h" const PARTITION VolToPart[] = { {0, 1}, // Logical drive 0 ==> Physical drive 0, 1st partition diff --git a/stmhal/ffconf.c b/stmhal/ffconf.c index 98eb159b62..74336310a7 100644 --- a/stmhal/ffconf.c +++ b/stmhal/ffconf.c @@ -30,7 +30,7 @@ #include "lib/fatfs/ff.h" #include "lib/fatfs/ffconf.h" #include "lib/fatfs/diskio.h" -#include "fsusermount.h" +#include "extmod/fsusermount.h" STATIC bool check_path(const TCHAR **path, const char *mount_point_str, mp_uint_t mount_point_len) { if (strncmp(*path, mount_point_str, mount_point_len) == 0) { diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c index e8dcd57a0f..be71f3f80e 100644 --- a/stmhal/modpyb.c +++ b/stmhal/modpyb.c @@ -33,6 +33,7 @@ #include "py/nlr.h" #include "py/obj.h" #include "py/gc.h" +#include "py/builtin.h" #include "lib/utils/pyexec.h" #include "lib/fatfs/ff.h" #include "lib/fatfs/diskio.h" @@ -58,7 +59,6 @@ #include "dac.h" #include "lcd.h" #include "usb.h" -#include "fsusermount.h" #include "portmodules.h" #include "modmachine.h" diff --git a/stmhal/moduos.c b/stmhal/moduos.c index 8864ec582a..b4c0ba5297 100644 --- a/stmhal/moduos.c +++ b/stmhal/moduos.c @@ -38,7 +38,7 @@ #include "uart.h" #include "file.h" #include "sdcard.h" -#include "fsusermount.h" +#include "extmod/fsusermount.h" #include "portmodules.h" /// \module os - basic "operating system" services |