| 800 | #endif |
| 801 | #ifdef BSP_USING_SDIO |
| 802 | int mnt_init(void) |
| 803 | { |
| 804 | rt_device_t dev = RT_NULL; |
| 805 | char dev_name[] = BSP_USING_SDIO_NAME; |
| 806 | rt_thread_mdelay(1000); |
| 807 | |
| 808 | dev = rt_device_find(dev_name); |
| 809 | if(dev) |
| 810 | { |
| 811 | if(dfs_mount("sd0","/","elm",0,0) == RT_EOK) |
| 812 | { |
| 813 | rt_kprintf("dfs mount success!\r\n"); |
| 814 | } |
| 815 | else |
| 816 | { |
| 817 | rt_kprintf("dfs mount failed!\r\n"); |
| 818 | rt_kprintf("Formatting the SD card!\r\n"); |
| 819 | dfs_mkfs("elm",dev_name); |
| 820 | if(dfs_mount("sd0","/","elm",0,0) == RT_EOK) |
| 821 | { |
| 822 | rt_kprintf("dfs mount success!\r\n"); |
| 823 | } |
| 824 | else |
| 825 | { |
| 826 | rt_kprintf("dfs mount failed!\r\n"); |
| 827 | rt_kprintf("Exit SD card mount!\r\n"); |
| 828 | } |
| 829 | } |
| 830 | } |
| 831 | return 0; |
| 832 | } |
| 833 | INIT_FS_EXPORT(mnt_init); |
| 834 | #endif /* BSP_USING_SDIO */ |
| 835 | #endif /* BSP_USING_TEST */ |
nothing calls this directly
no test coverage detected