summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-08-20 16:10:45 -0400
committerMeco Man <[email protected]>2021-08-20 16:10:45 -0400
commit2963a8095f1e9de007700d669695daf6e4fffd0e (patch)
tree40b03f5e377c747e59900498e3c74caa40eb1bf1
parent05098bd5a1a115c6689fe5b901afe1ea70eddf88 (diff)
[stm32-f407-explorer] remove sdcard thread
-rw-r--r--bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c b/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c
index 529b1e1157..6635c43128 100644
--- a/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c
+++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/drv_filesystem.c
@@ -29,46 +29,15 @@
#include <rtdbg.h>
#ifdef BSP_USING_SDCARD_FATFS
-static void sd_mount(void *parameter)
-{
- while (1)
- {
- rt_thread_mdelay(500);
- if(rt_device_find("sd0") != RT_NULL)
- {
- if (dfs_mount("sd0", "/sdcard", "elm", 0, 0) == RT_EOK)
- {
- LOG_I("sd card mount to '/sdcard'");
- break;
- }
- else
- {
- LOG_W("sd card mount to '/sdcard' failed!");
- }
- }
- }
-}
-
static int onboard_sdcard_mount(void)
{
- rt_thread_t tid;
-
if (dfs_mount("sd0", "/sdcard", "elm", 0, 0) == RT_EOK)
{
- LOG_I("sd card mount to '/sdcard'");
+ LOG_I("SD card mount to '/sdcard'");
}
else
{
- tid = rt_thread_create("sd_mount", sd_mount, RT_NULL,
- 1024, RT_THREAD_PRIORITY_MAX - 2, 20);
- if (tid != RT_NULL)
- {
- rt_thread_startup(tid);
- }
- else
- {
- LOG_E("create sd_mount thread err!");
- }
+ LOG_E("SD card mount to '/sdcard' failed!");
}
return RT_EOK;