forked from xuos/xiuos
delete useless code
This commit is contained in:
parent
8609045f2a
commit
b3c770dd26
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2020 AIIT XUOS Lab
|
|
||||||
* XiUOS is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file sd_card_mount.c
|
|
||||||
* @brief Mount SD card when opened SDIO
|
|
||||||
* @version 1.0
|
|
||||||
* @author AIIT XUOS Lab
|
|
||||||
* @date 2021.04.19
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "user_api/switch_api/user_api.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#if defined(FS_VFS)
|
|
||||||
#include <iot-vfs.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description: Mount SD card
|
|
||||||
* @return 0
|
|
||||||
*/
|
|
||||||
int MountSDCard(void)
|
|
||||||
{
|
|
||||||
if (MountFilesystem(SDIO_BUS_NAME, SDIO_DEVICE_NAME, SDIO_DRIVER_NAME, FSTYPE_FATFS, "/") == 0)
|
|
||||||
DBG("sd card mount to '/'");
|
|
||||||
else
|
|
||||||
SYS_WARN("sd card mount to '/' failed!");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),MountSDCard, MountSDCard, MountSDCard );
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2020 AIIT XUOS Lab
|
|
||||||
* XiUOS is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file spi_sd_card_mount.c
|
|
||||||
* @brief Mount SD card when opened SPI SD card
|
|
||||||
* @version 1.0
|
|
||||||
* @author AIIT XUOS Lab
|
|
||||||
* @date 2021.04.01
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "user_api/switch_api/user_api.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#if defined(FS_VFS)
|
|
||||||
#include <iot-vfs.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description: Mount SD card
|
|
||||||
* @return 0
|
|
||||||
*/
|
|
||||||
int MountSDCard(void)
|
|
||||||
{
|
|
||||||
struct Bus *spi_bus;
|
|
||||||
spi_bus = BusFind(SPI_BUS_NAME_1);
|
|
||||||
|
|
||||||
if (NONE == SpiSdInit(spi_bus, SPI_1_DEVICE_NAME_0, SPI_1_DRV_NAME, SPI_SD_NAME)) {
|
|
||||||
KPrintf("MountSDCard SpiSdInit error!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EOK == MountFilesystem(SPI_BUS_NAME_1, SPI_SD_NAME, SPI_1_DRV_NAME, FSTYPE_FATFS, "/"))
|
|
||||||
KPrintf("SPI SD card fatfs mounted\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -100,11 +100,7 @@ struct InitSequenceDesc components_init[] =
|
||||||
};
|
};
|
||||||
struct InitSequenceDesc env_init[] =
|
struct InitSequenceDesc env_init[] =
|
||||||
{
|
{
|
||||||
// #ifdef ARCH_RISCV
|
|
||||||
// #if defined (RESOURCES_SPI_SD)|| defined(RESOURCES_SDIO )
|
|
||||||
// { "MountSDCard", MountSDCard },
|
|
||||||
// #endif
|
|
||||||
// #endif
|
|
||||||
#ifdef MOUNT_SDCARD
|
#ifdef MOUNT_SDCARD
|
||||||
{ "MountSDCard", MountSDCard },
|
{ "MountSDCard", MountSDCard },
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,9 +115,6 @@ struct InitSequenceDesc env_init[] =
|
||||||
};
|
};
|
||||||
struct InitSequenceDesc communication_init[] =
|
struct InitSequenceDesc communication_init[] =
|
||||||
{
|
{
|
||||||
// #ifdef BSP_USING_SDIO
|
|
||||||
// { "Stm32SdcardMount",Stm32SdcardMount },
|
|
||||||
// #endif
|
|
||||||
#ifdef BSP_USING_USBH
|
#ifdef BSP_USING_USBH
|
||||||
{ "STM32USBHostRegister", STM32USBHostRegister },
|
{ "STM32USBHostRegister", STM32USBHostRegister },
|
||||||
{ "hw usb", Stm32HwUsbInit },
|
{ "hw usb", Stm32HwUsbInit },
|
||||||
|
|
Loading…
Reference in New Issue