diff options
18 files changed, 92 insertions, 134 deletions
diff --git a/bsp/nuvoton/libraries/m2354/rtt_port/Kconfig b/bsp/nuvoton/libraries/m2354/rtt_port/Kconfig index bf7d2da98d..5d06999d6b 100644 --- a/bsp/nuvoton/libraries/m2354/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/m2354/rtt_port/Kconfig @@ -470,6 +470,7 @@ config SOC_SERIES_M2354 menuconfig BSP_USING_SDH bool "Enable Secure Digital Host Controller(SDH)" select RT_USING_DFS + select DFS_USING_POSIX if BSP_USING_SDH config BSP_USING_SDH0 diff --git a/bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c b/bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c index 1ab43b4989..e71677a917 100644 --- a/bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c +++ b/bsp/nuvoton/libraries/m2354/rtt_port/drv_sdh.c @@ -19,14 +19,12 @@ #include <drv_pdma.h> #include <string.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> /* Private define ---------------------------------------------------------------*/ @@ -236,11 +234,13 @@ static rt_size_t nu_sdh_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_siz { rt_uint32_t ret = 0; nu_sdh_t sdh = (nu_sdh_t)dev; + rt_err_t result; RT_ASSERT(dev != RT_NULL); RT_ASSERT(buffer != RT_NULL); - rt_sem_take(&sdh->lock, RT_WAITING_FOREVER); + result = rt_sem_take(&sdh->lock, RT_WAITING_FOREVER); + RT_ASSERT(result == RT_EOK); /* Check alignment. */ if (((uint32_t)buffer & 0x03) != 0) @@ -281,7 +281,8 @@ exit_nu_sdh_read: sdh->pbuf = RT_NULL; } - rt_sem_release(&sdh->lock); + result = rt_sem_release(&sdh->lock); + RT_ASSERT(result == RT_EOK); if (ret == Successful) return blk_nb; @@ -295,11 +296,13 @@ static rt_size_t nu_sdh_write(rt_device_t dev, rt_off_t pos, const void *buffer, { rt_uint32_t ret = 0; nu_sdh_t sdh = (nu_sdh_t)dev; + rt_err_t result; RT_ASSERT(dev != RT_NULL); RT_ASSERT(buffer != RT_NULL); - rt_sem_take(&sdh->lock, RT_WAITING_FOREVER); + result = rt_sem_take(&sdh->lock, RT_WAITING_FOREVER); + RT_ASSERT(result == RT_EOK); /* Check alignment. */ if (((uint32_t)buffer & 0x03) != 0) @@ -338,7 +341,8 @@ exit_nu_sdh_write: sdh->pbuf = RT_NULL; } - rt_sem_release(&sdh->lock); + result = rt_sem_release(&sdh->lock); + RT_ASSERT(result == RT_EOK); if (ret == Successful) return blk_nb; @@ -393,7 +397,8 @@ static int rt_hw_sdh_init(void) /* Private */ nu_sdh_arr[i].dev.user_data = (void *)&nu_sdh_arr[i]; - rt_sem_init(&nu_sdh_arr[i].lock, "sdhlock", 1, RT_IPC_FLAG_FIFO); + ret = rt_sem_init(&nu_sdh_arr[i].lock, "sdhlock", 1, RT_IPC_FLAG_FIFO); + RT_ASSERT(ret == RT_EOK); SDH_Open(nu_sdh_arr[i].base, CardDetect_From_GPIO); @@ -402,6 +407,7 @@ static int rt_hw_sdh_init(void) NVIC_EnableIRQ(SDH0_IRQn); nu_sdh_arr[i].pbuf = RT_NULL; + ret = rt_device_register(&nu_sdh_arr[i].dev, nu_sdh_arr[i].name, flags); RT_ASSERT(ret == RT_EOK); } @@ -415,8 +421,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) { rt_bool_t ret = RT_FALSE; -#if defined(RT_USING_DFS) - struct dfs_filesystem *psFS = dfs_filesystem_lookup(mounting_path); if (psFS == RT_NULL) { @@ -431,8 +435,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) ret = RT_FALSE; } -#endif - exit_nu_sdh_hotplug_is_mounted: return ret; @@ -442,8 +444,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) rt_err_t ret = RT_ERROR; DIR *t; -#if defined(RT_USING_DFS) - if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_TRUE) { ret = RT_EOK; @@ -491,7 +491,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) exit_nu_sdh_hotplug_mount: -#endif return -(ret); } @@ -499,7 +498,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; -#if defined(RT_USING_DFS) if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_FALSE) { ret = RT_EOK; @@ -516,7 +514,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) rt_kprintf("Succeed to unmount %s.\n", sdh->mounted_point); ret = RT_EOK; } -#endif exit_nu_sdh_hotplug_unmount: @@ -585,7 +582,11 @@ static void sdh_hotplugger(void *param) int mnt_init_sdcard_hotplug(void) { - rt_thread_init(&sdh_tid, "hotplug", sdh_hotplugger, NULL, sdh_stack, sizeof(sdh_stack), RT_THREAD_PRIORITY_MAX - 2, 10); + rt_err_t result; + + result = rt_thread_init(&sdh_tid, "hotplug", sdh_hotplugger, NULL, sdh_stack, sizeof(sdh_stack), RT_THREAD_PRIORITY_MAX - 2, 10); + RT_ASSERT(result == RT_EOK); + rt_thread_startup(&sdh_tid); return 0; diff --git a/bsp/nuvoton/libraries/m2354/rtt_port/drv_usbhost.c b/bsp/nuvoton/libraries/m2354/rtt_port/drv_usbhost.c index fe5895dc9d..e54580d671 100644 --- a/bsp/nuvoton/libraries/m2354/rtt_port/drv_usbhost.c +++ b/bsp/nuvoton/libraries/m2354/rtt_port/drv_usbhost.c @@ -469,7 +469,7 @@ static void int_xfer_done_cb(UTR_T *psUTR) msg.type = USB_MSG_CALLBACK; msg.content.cb.function = pipe->callback; msg.content.cb.context = pipe; - rt_usbh_event_signal(&msg); + rt_usbh_event_signal(&s_sUSBHDev.uhcd, &msg); } exit_int_xfer_done_cb: diff --git a/bsp/nuvoton/libraries/m480/rtt_port/Kconfig b/bsp/nuvoton/libraries/m480/rtt_port/Kconfig index 22523e90b4..0d529462a3 100644 --- a/bsp/nuvoton/libraries/m480/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/m480/rtt_port/Kconfig @@ -447,6 +447,7 @@ config SOC_SERIES_M480 menuconfig BSP_USING_SDH bool "Enable Secure Digital Host Controller(SDH)" select RT_USING_DFS + select DFS_USING_POSIX if BSP_USING_SDH config BSP_USING_SDH0 diff --git a/bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c b/bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c index 7fdd2c8876..a4f49958c4 100644 --- a/bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c +++ b/bsp/nuvoton/libraries/m480/rtt_port/drv_sdh.c @@ -19,14 +19,12 @@ #include <drv_pdma.h> #include <string.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> /* Private define ---------------------------------------------------------------*/ @@ -457,8 +455,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) { rt_bool_t ret = RT_FALSE; -#if defined(RT_USING_DFS) - struct dfs_filesystem *psFS = dfs_filesystem_lookup(mounting_path); if (psFS == RT_NULL) { @@ -473,8 +469,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) ret = RT_FALSE; } -#endif - exit_nu_sdh_hotplug_is_mounted: return ret; @@ -484,8 +478,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) rt_err_t ret = RT_ERROR; DIR *t; -#if defined(RT_USING_DFS) - if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_TRUE) { ret = RT_EOK; @@ -533,7 +525,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) exit_nu_sdh_hotplug_mount: -#endif return -(ret); } @@ -541,7 +532,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; -#if defined(RT_USING_DFS) if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_FALSE) { ret = RT_EOK; @@ -558,7 +548,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) rt_kprintf("Succeed to unmount %s.\n", sdh->mounted_point); ret = RT_EOK; } -#endif exit_nu_sdh_hotplug_unmount: diff --git a/bsp/nuvoton/libraries/m480/rtt_port/drv_usbhost.c b/bsp/nuvoton/libraries/m480/rtt_port/drv_usbhost.c index c30bba60c8..0df76a63ad 100644 --- a/bsp/nuvoton/libraries/m480/rtt_port/drv_usbhost.c +++ b/bsp/nuvoton/libraries/m480/rtt_port/drv_usbhost.c @@ -472,7 +472,7 @@ static void int_xfer_done_cb(UTR_T *psUTR) msg.type = USB_MSG_CALLBACK; msg.content.cb.function = pipe->callback; msg.content.cb.context = pipe; - rt_usbh_event_signal(&msg); + rt_usbh_event_signal(&s_sUSBHDev.uhcd, &msg); } exit_int_xfer_done_cb: diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig b/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig index 4d863f6126..8d480dacf1 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/Kconfig @@ -273,6 +273,7 @@ config SOC_SERIES_N9H30 menuconfig BSP_USING_SDH bool "Enable Secure Digital Host Controller(SDH)" select RT_USING_DFS + select DFS_USING_POSIX if BSP_USING_SDH diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c index 26c3a3a90e..2ead28d452 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_sdh.c @@ -19,14 +19,12 @@ #include "NuMicro.h" #include <drv_sys.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> /* Private define ---------------------------------------------------------------*/ @@ -602,8 +600,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) { rt_bool_t ret = RT_FALSE; -#if defined(RT_USING_DFS) - struct dfs_filesystem *psFS = dfs_filesystem_lookup(mounting_path); if (psFS == RT_NULL) { @@ -620,15 +616,11 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) exit_nu_sdh_hotplug_is_mounted: -#endif - return ret; } static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; - -#if defined(RT_USING_DFS) DIR *t; if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_TRUE) @@ -678,7 +670,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) exit_nu_sdh_hotplug_mount: -#endif return -(ret); } @@ -686,7 +677,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; -#if defined(RT_USING_DFS) if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_FALSE) { ret = RT_EOK; @@ -706,8 +696,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) exit_nu_sdh_hotplug_unmount: -#endif - return -(ret); } diff --git a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_usbhost.c b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_usbhost.c index 85a1af96be..64e9dbf3ae 100644 --- a/bsp/nuvoton/libraries/n9h30/rtt_port/drv_usbhost.c +++ b/bsp/nuvoton/libraries/n9h30/rtt_port/drv_usbhost.c @@ -425,7 +425,7 @@ static int nu_bulk_xfer( UTR_T *psUTR, int timeouts) { - #define TIMEOUT_RETRY 3 +#define TIMEOUT_RETRY 3 int retry = TIMEOUT_RETRY; int ret = usbh_bulk_xfer(psUTR); @@ -435,9 +435,9 @@ static int nu_bulk_xfer( return ret; } - while ( retry > 0 ) + while (retry > 0) { - if ( rt_completion_wait(&(psPortDev->utr_completion), timeouts) != 0 ) + if (rt_completion_wait(&(psPortDev->utr_completion), timeouts) != 0) { rt_uint32_t level; @@ -513,7 +513,7 @@ static void int_xfer_done_cb(UTR_T *psUTR) msg.type = USB_MSG_CALLBACK; msg.content.cb.function = pipe->callback; msg.content.cb.context = pipe; - rt_usbh_event_signal(&msg); + rt_usbh_event_signal(&s_sUSBHDev.uhcd, &msg); } exit_int_xfer_done_cb: diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig b/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig index ffa3e55cc4..697685116c 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/Kconfig @@ -353,6 +353,7 @@ config SOC_SERIES_NUC980 menuconfig BSP_USING_SDH bool "Enable Secure Digital Host Controller(SDH)" select RT_USING_DFS + select DFS_USING_POSIX if BSP_USING_SDH config BSP_USING_SDH0 diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c index 6832db912b..bc3b23fd0d 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_sdh.c @@ -20,14 +20,12 @@ #include <drv_pdma.h> #include <drv_sys.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> /* Private define ---------------------------------------------------------------*/ @@ -458,8 +456,6 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) { rt_bool_t ret = RT_FALSE; -#if defined(RT_USING_DFS) - struct dfs_filesystem *psFS = dfs_filesystem_lookup(mounting_path); if (psFS == RT_NULL) { @@ -476,15 +472,11 @@ static rt_bool_t nu_sdh_hotplug_is_mounted(const char *mounting_path) exit_nu_sdh_hotplug_is_mounted: -#endif - return ret; } static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; - -#if defined(RT_USING_DFS) DIR *t; if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_TRUE) @@ -534,7 +526,6 @@ static rt_err_t nu_sdh_hotplug_mount(nu_sdh_t sdh) exit_nu_sdh_hotplug_mount: -#endif return -(ret); } @@ -542,7 +533,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) { rt_err_t ret = RT_ERROR; -#if defined(RT_USING_DFS) if (nu_sdh_hotplug_is_mounted(sdh->mounted_point) == RT_FALSE) { ret = RT_EOK; @@ -562,8 +552,6 @@ static rt_err_t nu_sdh_hotplug_unmount(nu_sdh_t sdh) exit_nu_sdh_hotplug_unmount: -#endif - return -(ret); } diff --git a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_usbhost.c b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_usbhost.c index 85a1af96be..64e9dbf3ae 100644 --- a/bsp/nuvoton/libraries/nuc980/rtt_port/drv_usbhost.c +++ b/bsp/nuvoton/libraries/nuc980/rtt_port/drv_usbhost.c @@ -425,7 +425,7 @@ static int nu_bulk_xfer( UTR_T *psUTR, int timeouts) { - #define TIMEOUT_RETRY 3 +#define TIMEOUT_RETRY 3 int retry = TIMEOUT_RETRY; int ret = usbh_bulk_xfer(psUTR); @@ -435,9 +435,9 @@ static int nu_bulk_xfer( return ret; } - while ( retry > 0 ) + while (retry > 0) { - if ( rt_completion_wait(&(psPortDev->utr_completion), timeouts) != 0 ) + if (rt_completion_wait(&(psPortDev->utr_completion), timeouts) != 0) { rt_uint32_t level; @@ -513,7 +513,7 @@ static void int_xfer_done_cb(UTR_T *psUTR) msg.type = USB_MSG_CALLBACK; msg.content.cb.function = pipe->callback; msg.content.cb.context = pipe; - rt_usbh_event_signal(&msg); + rt_usbh_event_signal(&s_sUSBHDev.uhcd, &msg); } exit_int_xfer_done_cb: diff --git a/bsp/nuvoton/nk-980iot/applications/mnt.c b/bsp/nuvoton/nk-980iot/applications/mnt.c index fc440ab8e4..07905a6b13 100644 --- a/bsp/nuvoton/nk-980iot/applications/mnt.c +++ b/bsp/nuvoton/nk-980iot/applications/mnt.c @@ -21,14 +21,12 @@ #define DBG_COLOR #include <rtdbg.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> diff --git a/bsp/nuvoton/nk-n9h30/applications/mnt.c b/bsp/nuvoton/nk-n9h30/applications/mnt.c index 05b29c2a24..9fdf7ec3a1 100644 --- a/bsp/nuvoton/nk-n9h30/applications/mnt.c +++ b/bsp/nuvoton/nk-n9h30/applications/mnt.c @@ -21,14 +21,12 @@ #define DBG_COLOR #include <rtdbg.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> diff --git a/bsp/nuvoton/nk-rtu980/applications/mnt.c b/bsp/nuvoton/nk-rtu980/applications/mnt.c index 266ea0ede0..1c834fcb3e 100644 --- a/bsp/nuvoton/nk-rtu980/applications/mnt.c +++ b/bsp/nuvoton/nk-rtu980/applications/mnt.c @@ -21,14 +21,12 @@ #define DBG_COLOR #include <rtdbg.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> diff --git a/bsp/nuvoton/numaker-iot-m487/applications/mnt.c b/bsp/nuvoton/numaker-iot-m487/applications/mnt.c index 3bafda9b75..9abcd5de26 100644 --- a/bsp/nuvoton/numaker-iot-m487/applications/mnt.c +++ b/bsp/nuvoton/numaker-iot-m487/applications/mnt.c @@ -12,14 +12,12 @@ #include <rtthread.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> diff --git a/bsp/nuvoton/numaker-m032ki/applications/mnt.c b/bsp/nuvoton/numaker-m032ki/applications/mnt.c index 62c470570c..7ac94f7f0f 100644 --- a/bsp/nuvoton/numaker-m032ki/applications/mnt.c +++ b/bsp/nuvoton/numaker-m032ki/applications/mnt.c @@ -12,14 +12,12 @@ #include <rtthread.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> diff --git a/bsp/nuvoton/numaker-pfm-m487/applications/mnt.c b/bsp/nuvoton/numaker-pfm-m487/applications/mnt.c index 398f292c43..0b4ed458b1 100644 --- a/bsp/nuvoton/numaker-pfm-m487/applications/mnt.c +++ b/bsp/nuvoton/numaker-pfm-m487/applications/mnt.c @@ -12,14 +12,12 @@ #include <rtthread.h> -#if defined(RT_USING_DFS) - #include <dfs_fs.h> - #include <dfs_file.h> - #include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - #include <sys/statfs.h> -#endif +#include <dfs_fs.h> +#include <dfs_file.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/statfs.h> #if defined(PKG_USING_FAL) #include <fal.h> |
