From 180fb2bd4c3926027646d3160f7675c1c68f8853 Mon Sep 17 00:00:00 2001 From: CXSforHPU <19511928573@163.com> Date: Mon, 10 Mar 2025 11:52:47 +0800 Subject: [PATCH] [bsp/renesas/vision_board] modify kconfig for sdhi,and remove mmcsd_wait_cd_changed --- bsp/renesas/ra8d1-vision-board/board/Kconfig | 15 ++++++++++++++- bsp/renesas/ra8d1-vision-board/board/ports/mnt.c | 10 +--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/bsp/renesas/ra8d1-vision-board/board/Kconfig b/bsp/renesas/ra8d1-vision-board/board/Kconfig index 841f8c0692..2b64c32680 100644 --- a/bsp/renesas/ra8d1-vision-board/board/Kconfig +++ b/bsp/renesas/ra8d1-vision-board/board/Kconfig @@ -21,12 +21,25 @@ menu "Hardware Drivers Config" select RT_USING_MTD_NOR select BSP_USING_ONCHIP_FLASH default n - config BSP_USING_SDCARD_FS + + menuconfig BSP_USING_SDCARD_FS bool "Enable SDCARD filesystem" select BSP_USING_SDHI select BSP_USING_SDHI1 select RT_USING_DFS_ELMFAT default n + + if BSP_USING_SDCARD_FS + + config SDHI_USING_CD + bool "enable RA_SDHI_CD_PIN" + default y + + config RA_SDHI_CD_PIN + string "SD Card hot plug detection pin" + default "p503" + endif + config BSP_USING_SPICARD_FS bool "Enable SPI FLASH filesystem" select BSP_USING_SCI diff --git a/bsp/renesas/ra8d1-vision-board/board/ports/mnt.c b/bsp/renesas/ra8d1-vision-board/board/ports/mnt.c index 4768e3173c..cf6d889e91 100644 --- a/bsp/renesas/ra8d1-vision-board/board/ports/mnt.c +++ b/bsp/renesas/ra8d1-vision-board/board/ports/mnt.c @@ -4,13 +4,10 @@ #ifdef BSP_USING_FS #include +#include #define DBG_TAG "app.filesystem" #define DBG_LVL DBG_INFO -#include - -#define SDHI_USING_CD -#define RA_SDHI_CD_PIN "p503" #ifdef BSP_USING_OPENMV #include "led.h" @@ -175,11 +172,6 @@ int sd_mount(void) int mount_init(void) { - mmcsd_wait_cd_changed(0); - - sdcard_change(); - mmcsd_wait_cd_changed(RT_WAITING_FOREVER); - rt_thread_mdelay(200); sd_mount(); return RT_EOK;