summaryrefslogtreecommitdiff
path: root/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c
blob: 2df64daa45b2a2a5db7068e5417870ce685b878d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <rtthread.h>
#include <rtconfig.h>
#include <dev_spi_msd.h>
#include <dfs_fs.h>

int mnt_init(void)
{
    msd_init("sd0", "spi00");

    if (dfs_mount("sd0", "/", "ext", 0, 0) == 0)
    {
        rt_kprintf("Mount \"/dev/sd0p1\" on \"/\"\n");
    }
    else if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
    {
        rt_kprintf("Mount \"/dev/sd0p1\" on \"/\"\n");
    }
    return 0;
}
INIT_ENV_EXPORT(mnt_init);