From 8cb78e0e5356134e9313e745667297d6b9dc46ed Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 15 Feb 2016 00:08:37 +0200 Subject: [PATCH] extmod/vfs_fat_diskio: Reusable FatFs module, move from stmhal/diskio. --- stmhal/diskio.c => extmod/vfs_fat_diskio.c | 5 +++++ py/py.mk | 1 + stmhal/Makefile | 1 - unix/Makefile | 1 - 4 files changed, 6 insertions(+), 2 deletions(-) rename stmhal/diskio.c => extmod/vfs_fat_diskio.c (99%) diff --git a/stmhal/diskio.c b/extmod/vfs_fat_diskio.c similarity index 99% rename from stmhal/diskio.c rename to extmod/vfs_fat_diskio.c index 03be24188e..7acdc82972 100644 --- a/stmhal/diskio.c +++ b/extmod/vfs_fat_diskio.c @@ -27,6 +27,9 @@ * THE SOFTWARE. */ +#include "py/mpconfig.h" +#if MICROPY_FSUSERMOUNT + #include #include @@ -248,3 +251,5 @@ DRESULT disk_ioctl ( } } #endif + +#endif // MICROPY_FSUSERMOUNT diff --git a/py/py.mk b/py/py.mk index 61faf08920..9391bbdfb8 100644 --- a/py/py.mk +++ b/py/py.mk @@ -171,6 +171,7 @@ PY_O_BASENAME = \ ../extmod/modurandom.o \ ../extmod/fsusermount.o \ ../extmod/vfs_fat.o \ + ../extmod/vfs_fat_diskio.o \ ../extmod/moduos_dupterm.o \ # prepend the build destination prefix to the py object files diff --git a/stmhal/Makefile b/stmhal/Makefile index 3cad7d1da4..cd565a6f4a 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -156,7 +156,6 @@ SRC_C = \ file.c \ builtin_open.c \ sdcard.c \ - diskio.c \ fatfs_port.c \ ffconf.c \ lcd.c \ diff --git a/unix/Makefile b/unix/Makefile index 42f0edf811..342786debe 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -148,7 +148,6 @@ SRC_C = \ $(SRC_MOD) STMHAL_SRC_C = \ - stmhal/diskio.c \ stmhal/ffconf.c \ stmhal/file.c