diff options
Diffstat (limited to 'bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c')
| -rw-r--r-- | bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c b/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c new file mode 100644 index 0000000000..2df64daa45 --- /dev/null +++ b/bsp/ultrarisc/ur_dp1000_evb/applications/mnt.c @@ -0,0 +1,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);
\ No newline at end of file |
