📄 fs_init.c
字号:
/*
**********************************************************************
* Micrium, Inc.
* 949 Crestview Circle
* Weston, FL 33327-1848
*
* uC/FS
*
* (c) Copyright 2001 - 2003, Micrium, Inc.
* All rights reserved.
*
***********************************************************************
----------------------------------------------------------------------
File : FS_Init.c
Purpose : Implementation of FS_Init()
---------------------------END-OF-HEADER------------------------------
*/
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "FS_ConfDefaults.h" /* FS Configuration */
#include "fs_api.h"
#include "FS_OS.h"
/*********************************************************************
*
* FS_Init
*
* Description:
* API function. Start the file system.
*
* Parameters:
* None.
*
* Return value:
* ==0 - File system has been started.
* !=0 - An error has occured.
*/
int FS_Init(void) {
int x;
x = FS_X_OS_Init(); /* Init the OS, e.g. create semaphores */
#if FS_USE_SMC_DRIVER
FS_AddDevice(&FS__smcdevice_driver);
#endif
#if FS_USE_MMC_DRIVER
FS_AddDevice(&FS__mmcdevice_driver);
#endif
#if FS_USE_IDE_DRIVER
FS_AddDevice(&FS__idedevice_driver);
#endif
#if FS_USE_FLASH_DRIVER
FS_AddDevice(&FS__flashdevice_driver);
#endif
#if FS_USE_SFLASH_DRIVER
FS_AddDevice(&FS__SFlash_Driver);
#endif
#if FS_USE_WINDRIVE_DRIVER
FS_AddDevice(&FS__windrive_driver);
#endif
#if FS_USE_RAMDISK_DRIVER
FS_AddDevice(&FS__ramdevice_driver);
FS_Format("ram:", 0);
#if FS_RAMDISK_MAXUNIT > 1
FS_Format("ram:1:", 0);
#endif
#endif
#if FS_USE_GENDEV_DRIVER
FS_AddDevice(&FS__genericdevice_driver);
#endif
return x;
}
/*************************** End of file ****************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -