Просмотр исходного кода

add DFS_ELMFAT option

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@142 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 лет назад
Родитель
Сommit
6e71f1af7d
2 измененных файлов с 15 добавлено и 7 удалено
  1. 11 0
      bsp/stm32_radio/application.c
  2. 4 7
      bsp/stm32_radio/rtconfig.h

+ 11 - 0
bsp/stm32_radio/application.c

@@ -92,6 +92,7 @@ void rt_init_thread_entry(void *parameter)
     {
         /* init the device filesystem */
         dfs_init();
+#ifdef RT_USING_DFS_EFSL
         /* init the efsl filesystam*/
         efsl_init();
 
@@ -100,6 +101,16 @@ void rt_init_thread_entry(void *parameter)
             rt_kprintf("File System initialized!\n");
         else
             rt_kprintf("File System init failed!\n");
+#elif defined(RT_USING_DFS_ELMFAT)
+        /* init the elm FAT filesystam*/
+        elm_init();
+
+        /* mount sd card fat partition 1 as root directory */
+        if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
+            rt_kprintf("File System initialized!\n");
+        else
+            rt_kprintf("File System init failed!\n");
+#endif
     }
 #endif
 

+ 4 - 7
bsp/stm32_radio/rtconfig.h

@@ -34,9 +34,6 @@
 /* Using Event*/
 #define RT_USING_EVENT
 
-/* Using Faset Event*/
-/* #define RT_USING_FASTEVENT */
-
 /* Using MailBox*/
 #define RT_USING_MAILBOX
 
@@ -73,10 +70,7 @@
 /* Using symbol table */
 #define FINSH_USING_SYMTAB
 #define FINSH_USING_DESCRIPTION
-
-/* SECTION: a mini libc */
-/* Using mini libc library*/
-/* #define RT_USING_MINILIBC */
+#define FINSH_DEVICE_NAME   "uart1"
 
 /* SECTION: C++ support */
 /* Using C++ support*/
@@ -85,6 +79,8 @@
 /* #define RT_USING_RTGUI */
 
 #define RT_USING_DFS
+#define RT_USING_DFS_EFSL
+// #define RT_USING_DFS_ELMFAT
 /* SECTION: DFS options */
 /* the max number of mounted filesystem */
 #define DFS_FILESYSTEMS_MAX			1
@@ -156,6 +152,7 @@
 #define RT_LWIP_ETHTHREAD_MBOX_SIZE		4
 #define RT_LWIP_ETHTHREAD_STACKSIZE		512
 
+/* SECTION: RT-Thread/GUI */
 #define RT_USING_RTGUI
 
 #endif