summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-15 00:19:27 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-02-15 00:19:27 +0200
commit46a0ac02c529e8dd18feff0394ed5709db26dc2b (patch)
tree068d0885dec203bb06ccc7a004eb671a54a42e14
parent6b0c88256b03de63280eb7b704f5b6aaa5e9cc46 (diff)
downloadmicropython-46a0ac02c529e8dd18feff0394ed5709db26dc2b.tar.gz
micropython-46a0ac02c529e8dd18feff0394ed5709db26dc2b.zip
extmod/vfs_fat_ffconf: Reusable FatFs module, move from stmhal/ffconf.
TODO: Probably merge into vfs_fat_diskio.
-rw-r--r--extmod/vfs_fat_ffconf.c (renamed from stmhal/ffconf.c)5
-rw-r--r--py/py.mk1
-rw-r--r--stmhal/Makefile1
-rw-r--r--unix/Makefile3
4 files changed, 6 insertions, 4 deletions
diff --git a/stmhal/ffconf.c b/extmod/vfs_fat_ffconf.c
index 6cd140f227..f8935af751 100644
--- a/stmhal/ffconf.c
+++ b/extmod/vfs_fat_ffconf.c
@@ -24,6 +24,9 @@
* THE SOFTWARE.
*/
+#include "py/mpconfig.h"
+#if MICROPY_FSUSERMOUNT
+
#include <string.h>
#include "py/mpstate.h"
@@ -75,3 +78,5 @@ void ff_get_volname(BYTE vol, TCHAR **dest) {
memcpy(*dest, vfs->str, vfs->len);
*dest += vfs->len;
}
+
+#endif // MICROPY_FSUSERMOUNT
diff --git a/py/py.mk b/py/py.mk
index 2213e6a0a2..bbcd82566a 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_ffconf.o \
../extmod/vfs_fat_diskio.o \
../extmod/vfs_fat_file.o \
../extmod/moduos_dupterm.o \
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 884a40fda9..b2dba37b83 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -156,7 +156,6 @@ SRC_C = \
builtin_open.c \
sdcard.c \
fatfs_port.c \
- ffconf.c \
lcd.c \
accel.c \
servo.c \
diff --git a/unix/Makefile b/unix/Makefile
index 18186ec566..729d894a1d 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -147,9 +147,6 @@ SRC_C = \
fatfs_port.c \
$(SRC_MOD)
-STMHAL_SRC_C = \
- stmhal/ffconf.c
-
# Include builtin package manager in the standard build (and coverage)
ifeq ($(PROG),micropython)
SRC_C += $(BUILD)/_frozen_upip.c