mnt.c 363 B

1234567891011121314151617181920212223
  1. #include <rtthread.h>
  2. #ifdef RT_USING_DFS
  3. #include <dfs_fs.h>
  4. int mnt_init(void)
  5. {
  6. rt_thread_delay(RT_TICK_PER_SECOND);
  7. if (dfs_mount("W25Q256", "/", "elm", 0, 0) == 0)
  8. {
  9. rt_kprintf("W25Q256 mount successful!\n");
  10. }
  11. else
  12. {
  13. rt_kprintf("W25Q256 mount failed!\n");
  14. }
  15. return 0;
  16. }
  17. INIT_ENV_EXPORT(mnt_init);
  18. #endif