[bsp] [stm32] port to dfs

This commit is contained in:
tyustli 2019-09-04 20:36:52 +08:00
parent 03f8762e28
commit 1d44368b27
2 changed files with 23 additions and 0 deletions

View File

@ -7,6 +7,9 @@ src = Split("""
main.c
""")
if GetDepend(['RT_USING_DFS']):
src += ['mnt.c']
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
Return('group')

View File

@ -0,0 +1,20 @@
#include <rtthread.h>
#ifdef RT_USING_DFS
#include <dfs_fs.h>
int mnt_init(void)
{
if (dfs_mount("W25Q256", "/", "elm", 0, 0) == 0)
{
rt_kprintf("W25Q256 mount successful!\n");
}
else
{
rt_kprintf("W25Q256 mount failed!\n");
}
return 0;
}
INIT_ENV_EXPORT(mnt_init);
#endif