diff --git a/stmhal/Makefile b/stmhal/Makefile index c457e2ff13..46125d10b5 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -39,7 +39,6 @@ INC += -I$(CMSIS_DIR)/devinc INC += -I$(HAL_DIR)/inc INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/inc #INC += -I$(USBHOST_DIR) -INC += -I../$(FATFS_DIR) INC += -I../lib/mp-readline CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion diff --git a/stmhal/diskio.c b/stmhal/diskio.c index 948297aa48..9cae46eb18 100644 --- a/stmhal/diskio.c +++ b/stmhal/diskio.c @@ -33,12 +33,11 @@ #include "stm32f4xx_hal.h" #include "py/runtime.h" -#include "systick.h" +#include "lib/fatfs/ff.h" /* FatFs lower layer API */ +#include "lib/fatfs/diskio.h" /* FatFs lower layer API */ #include "rtc.h" #include "storage.h" #include "sdcard.h" -#include "ff.h" /* FatFs lower layer API */ -#include "diskio.h" /* FatFs lower layer API */ #include "fsusermount.h" const PARTITION VolToPart[] = { diff --git a/stmhal/ffconf.c b/stmhal/ffconf.c index 0a4745462e..b8dada3cca 100644 --- a/stmhal/ffconf.c +++ b/stmhal/ffconf.c @@ -27,7 +27,7 @@ #include #include "py/obj.h" -#include "ff.h" +#include "lib/fatfs/ff.h" #include "ffconf.h" #include "fsusermount.h" diff --git a/stmhal/file.c b/stmhal/file.c index 66bb51f49c..62e5828747 100644 --- a/stmhal/file.c +++ b/stmhal/file.c @@ -30,8 +30,8 @@ #include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" +#include "lib/fatfs/ff.h" #include "file.h" -#include "ff.h" extern const mp_obj_type_t mp_type_fileio; extern const mp_obj_type_t mp_type_textio; diff --git a/stmhal/fsusermount.c b/stmhal/fsusermount.c index 0cd36480e6..5ddb4c29ba 100644 --- a/stmhal/fsusermount.c +++ b/stmhal/fsusermount.c @@ -26,7 +26,7 @@ #include "py/nlr.h" #include "py/runtime.h" -#include "ff.h" +#include "lib/fatfs/ff.h" #include "fsusermount.h" // for user-mountable block device diff --git a/stmhal/import.c b/stmhal/import.c index e94cf620e0..c28fe87628 100644 --- a/stmhal/import.c +++ b/stmhal/import.c @@ -27,7 +27,7 @@ #include #include "py/lexer.h" -#include "ff.h" +#include "lib/fatfs/ff.h" mp_import_stat_t mp_import_stat(const char *path) { FILINFO fno; diff --git a/stmhal/lexerfatfs.c b/stmhal/lexerfatfs.c index 639cd1f2f1..ddab89a5c3 100644 --- a/stmhal/lexerfatfs.c +++ b/stmhal/lexerfatfs.c @@ -27,8 +27,8 @@ #include #include "py/lexer.h" +#include "lib/fatfs/ff.h" #include "lexerfatfs.h" -#include "ff.h" typedef struct _mp_lexer_file_buf_t { FIL fp; diff --git a/stmhal/main.c b/stmhal/main.c index f91d10d325..d57bb2b2d4 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -35,6 +35,8 @@ #include "py/stackctrl.h" #include "py/gc.h" +#include "lib/fatfs/ff.h" + #include "systick.h" #include "pendsv.h" #include "gccollect.h" @@ -52,7 +54,6 @@ #include "rtc.h" #include "storage.h" #include "sdcard.h" -#include "ff.h" #include "rng.h" #include "accel.h" #include "servo.h" diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c index 40189c1e77..b81f43c1d0 100644 --- a/stmhal/modpyb.c +++ b/stmhal/modpyb.c @@ -33,6 +33,8 @@ #include "py/nlr.h" #include "py/obj.h" #include "py/gc.h" +#include "lib/fatfs/ff.h" +#include "lib/fatfs/diskio.h" #include "gccollect.h" #include "irq.h" #include "systick.h" @@ -56,8 +58,6 @@ #include "dac.h" #include "lcd.h" #include "usb.h" -#include "ff.h" -#include "diskio.h" #include "fsusermount.h" #include "portmodules.h" diff --git a/stmhal/moduos.c b/stmhal/moduos.c index 9f8de8046e..7c73d60510 100644 --- a/stmhal/moduos.c +++ b/stmhal/moduos.c @@ -30,11 +30,10 @@ #include "py/nlr.h" #include "py/obj.h" #include "py/objtuple.h" -#include "systick.h" +#include "lib/fatfs/ff.h" +#include "lib/fatfs/diskio.h" #include "rng.h" #include "storage.h" -#include "ff.h" -#include "diskio.h" #include "file.h" #include "sdcard.h" #include "fsusermount.h" diff --git a/stmhal/usbd_msc_storage.c b/stmhal/usbd_msc_storage.c index 03483ef093..82fa550dc9 100644 --- a/stmhal/usbd_msc_storage.c +++ b/stmhal/usbd_msc_storage.c @@ -37,8 +37,8 @@ #include "usbd_msc_storage.h" #include "py/misc.h" +#include "lib/fatfs/diskio.h" #include "storage.h" -#include "diskio.h" #include "sdcard.h" // These are needed to support removal of the medium, so that the USB drive