提交 2963a809 编写于 作者: mysterywolf's avatar mysterywolf

[stm32-f407-explorer] remove sdcard thread

上级 05098bd5
...@@ -29,46 +29,15 @@ ...@@ -29,46 +29,15 @@
#include <rtdbg.h> #include <rtdbg.h>
#ifdef BSP_USING_SDCARD_FATFS #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) static int onboard_sdcard_mount(void)
{ {
rt_thread_t tid;
if (dfs_mount("sd0", "/sdcard", "elm", 0, 0) == RT_EOK) 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 else
{ {
tid = rt_thread_create("sd_mount", sd_mount, RT_NULL, LOG_E("SD card mount to '/sdcard' failed!");
1024, RT_THREAD_PRIORITY_MAX - 2, 20);
if (tid != RT_NULL)
{
rt_thread_startup(tid);
}
else
{
LOG_E("create sd_mount thread err!");
}
} }
return RT_EOK; return RT_EOK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册