diff options
| author | greedyhao <[email protected]> | 2021-06-21 21:07:58 +0800 |
|---|---|---|
| committer | greedyhao <[email protected]> | 2021-06-21 21:07:58 +0800 |
| commit | 7c259a05c2a07d800135b2da701071e2d577b6d8 (patch) | |
| tree | 96b8238ec5cc7cfbb4c81f6dcbda5df682998fe5 | |
| parent | 9d08e9fb1243aff1d23ff0da1fec4d5a13f765e6 (diff) | |
[bsp][bluetrum] Compatible romfs
| -rw-r--r-- | bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c b/bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c index 18793cb967..e719cd6c52 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c +++ b/bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c @@ -10,7 +10,7 @@ #include <rtthread.h> -#ifdef BSP_USING_SDIO +#if defined (BSP_USING_SDCARD) #include <dfs_elm.h> #include <dfs_fs.h> @@ -58,4 +58,23 @@ int ab32_sdcard_mount(void) return RT_EOK; } INIT_APP_EXPORT(ab32_sdcard_mount); +#elif defined (RT_USING_DFS_ROMFS) + +#include <dfs_fs.h> +#include "dfs_romfs.h" + +int ab32_romfs_mount(void) +{ + if (dfs_mount(RT_NULL, "/", "rom", 0, &(romfs_root)) == 0) + { + rt_kprintf("ROM file system initializated!\n"); + } + else + { + rt_kprintf("ROM file system initializate failed!\n"); + } + + return 0; +} +INIT_ENV_EXPORT(ab32_romfs_mount); #endif |
