repair 'mount sd card'

This commit is contained in:
Wang_Weigen
2021-11-09 17:13:07 +08:00
parent 9959ec6470
commit 8609045f2a
7 changed files with 95 additions and 3 deletions
@@ -53,6 +53,13 @@ menu "aiit-riscv64-board feature"
endif
endmenu
menu "config board peripheral"
config MOUNT_SDCARD
bool "mount cd card"
default n
select BSP_USING_SDIO
endmenu
endmenu
config __STACKSIZE__
@@ -64,6 +64,28 @@ extern int HwRtcInit(void);
extern int HwTouchBusInit(void);
extern int HwCh376Init(void);
#if defined(FS_VFS) && defined(MOUNT_SDCARD)
#include <iot-vfs.h>
/**
* @description: Mount SD card
* @return 0
*/
/**
* @description: Mount SD card
* @return 0
*/
int MountSDCard(void)
{
if (MountFilesystem(SDIO_BUS_NAME, SDIO_DEVICE_NAME, SDIO_DRIVER_NAME, FSTYPE_CH376, "/") == 0)
DBG("sd card mount to '/'");
else
SYS_WARN("sd card mount to '/' failed!");
return 0;
}
#endif
void init_bss(void)
{
unsigned int *dst;