diff --git a/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.c b/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.c index 17dfb55e7607b52269404b90f6d3ed139e6c85cf..1baabd98498e8a69b54f17b133226097ed179393 100644 --- a/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.c +++ b/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.c @@ -30,7 +30,9 @@ */ #include "fs_config.h" -#include "fatfs.h" #include "ff_gen_drv.h" +#ifdef LOSCFG_SUPPORT_FATFS +#include "fatfs.h" DiskDrvTypeDef g_diskDrv = { { 0 }, { 0 }, { 0 }, { 0 } }; +#endif \ No newline at end of file diff --git a/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.h b/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.h index 4b54588d77d44eafa19321542e568845ffe807ae..fdc3a5c738c4814865fc915a3455298a96919aea 100644 --- a/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.h +++ b/arm_mps2_an386/liteos_m/board/fs/ff_gen_drv.h @@ -33,7 +33,9 @@ #define FF_GEN_DRV_H #include "stdint.h" +#ifdef LOSCFG_SUPPORT_FATFS #include "diskio.h" +#endif #ifdef __cplusplus #if __cplusplus @@ -41,6 +43,7 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ +#ifdef LOSCFG_SUPPORT_FATFS typedef struct { DSTATUS (*disk_initialize)(BYTE); DSTATUS (*disk_status)(BYTE); @@ -57,6 +60,7 @@ typedef struct { } DiskDrvTypeDef; extern DiskDrvTypeDef g_diskDrv; +#endif #ifdef __cplusplus #if __cplusplus } diff --git a/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.c b/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.c index 226a0f479742d3b707410c88997fd9866460fb54..ea6f15c213fc8067a267eadd169165e9c65604c5 100644 --- a/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.c +++ b/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.c @@ -29,7 +29,9 @@ */ #include "fs_config.h" -#include "fatfs.h" #include "ff_gen_drv.h" +#ifdef LOSCFG_SUPPORT_FATFS +#include "fatfs.h" DiskDrvTypeDef g_diskDrv = { { 0 }, { 0 }, { 0 }, { 0 } }; +#endif \ No newline at end of file diff --git a/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.h b/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.h index 892128b6d90d8db97534d50b09dba78a4b3fef0a..dcda95506c6ddd3d18acba4c3e0d1d2f72ac9796 100644 --- a/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.h +++ b/arm_mps3_an547/liteos_m/board/fs/ff_gen_drv.h @@ -32,7 +32,9 @@ #define FF_GEN_DRV_H #include "stdint.h" +#ifdef LOSCFG_SUPPORT_FATFS #include "diskio.h" +#endif #ifdef __cplusplus #if __cplusplus @@ -40,6 +42,7 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ +#ifdef LOSCFG_SUPPORT_FATFS typedef struct { DSTATUS (*disk_initialize)(BYTE); DSTATUS (*disk_status)(BYTE); @@ -56,6 +59,7 @@ typedef struct { } DiskDrvTypeDef; extern DiskDrvTypeDef g_diskDrv; +#endif #ifdef __cplusplus #if __cplusplus }