blob: 14949abff41539aca3a068fcbcb749741afda28b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <rtthread.h>
#ifdef RT_USING_DFS
#include <dfs_fs.h>
#include "dfs_ramfs.h"
int mnt_init(void)
{
rt_uint32_t tryCnt = 5;
rt_device_t dev;
while(tryCnt--)
{
dev = rt_device_find("sd0");
if(dev != RT_NULL)
{
break;
}
rt_thread_mdelay(500);
}
if(dfs_mount("sd0", "/", "elm", 0, 0) == 0)
{
rt_kprintf("File System initialized!\n");
}
else
{
rt_kprintf("File System initialzation failed!\n");
}
return RT_EOK;
}
INIT_ENV_EXPORT(mnt_init);
#endif
|