diff --git a/APP_Framework/Applications/app_test/sd_card_mount.c b/APP_Framework/Applications/app_test/sd_card_mount.c deleted file mode 100644 index 3b660b2a3..000000000 --- a/APP_Framework/Applications/app_test/sd_card_mount.c +++ /dev/null @@ -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 - -#if defined(FS_VFS) -#include - -/** - * @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 ); diff --git a/APP_Framework/Applications/app_test/spi_sd_card_mount.c b/APP_Framework/Applications/app_test/spi_sd_card_mount.c deleted file mode 100644 index 4fa35b054..000000000 --- a/APP_Framework/Applications/app_test/spi_sd_card_mount.c +++ /dev/null @@ -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 - -#if defined(FS_VFS) -#include - -/** - * @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 diff --git a/Ubiquitous/XiUOS/kernel/thread/init.c b/Ubiquitous/XiUOS/kernel/thread/init.c index 6621d1c09..adc4c7377 100644 --- a/Ubiquitous/XiUOS/kernel/thread/init.c +++ b/Ubiquitous/XiUOS/kernel/thread/init.c @@ -100,11 +100,7 @@ struct InitSequenceDesc components_init[] = }; struct InitSequenceDesc env_init[] = { -// #ifdef ARCH_RISCV -// #if defined (RESOURCES_SPI_SD)|| defined(RESOURCES_SDIO ) -// { "MountSDCard", MountSDCard }, -// #endif -// #endif + #ifdef MOUNT_SDCARD { "MountSDCard", MountSDCard }, #endif @@ -119,9 +115,6 @@ struct InitSequenceDesc env_init[] = }; struct InitSequenceDesc communication_init[] = { -// #ifdef BSP_USING_SDIO -// { "Stm32SdcardMount",Stm32SdcardMount }, -// #endif #ifdef BSP_USING_USBH { "STM32USBHostRegister", STM32USBHostRegister }, { "hw usb", Stm32HwUsbInit },