diff --git a/configs/nucleo-l476rg/src/nucleo-l476rg.h b/configs/nucleo-l476rg/src/nucleo-l476rg.h index 665889a4a16..aa06f948fb2 100644 --- a/configs/nucleo-l476rg/src/nucleo-l476rg.h +++ b/configs/nucleo-l476rg/src/nucleo-l476rg.h @@ -57,7 +57,7 @@ #define HAVE_RTC_DRIVER 1 #define HAVE_MMCSD_SPI 1 -#define HAVE_MMCSD 1 +#define HAVE_MMCSD_SDIO 1 #if !defined(CONFIG_FS_PROCFS) # undef HAVE_PROC @@ -76,12 +76,12 @@ #if !defined(CONFIG_STM32L4_SPI1) || !defined(CONFIG_MMCSD) || \ !defined(CONFIG_MMCSD_SPI) -# undef HAVE_MMCSD +# undef HAVE_MMCSD_SPI #endif #if !defined(CONFIG_STM32L4_SDIO) || !defined(CONFIG_MMCSD) || \ !defined(CONFIG_MMCSD_SDIO) -# undef HAVE_MMCSD +# undef HAVE_MMCSD_SDIO #endif /* LED. User LD2: the green LED is a user LED connected to Arduino signal D13 @@ -139,18 +139,12 @@ GPIO_EXTI | GPIO_SPEED_50MHz) #endif -#ifdef HAVE_MMCSD -# define GPIO_SPI_CS_SD_CARD_OFF \ - (GPIO_INPUT | GPIO_PULLDOWN | GPIO_SPEED_2MHz | \ - GPIO_PORTB | GPIO_PIN5) -#endif - /* SPI chip selects */ #ifdef CONFIG_MMCSD_SPI # define GPIO_SPI_CS_SD_CARD \ - (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \ - GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) + (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \ + GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10) #endif #ifdef CONFIG_LCD_PCD8544 @@ -285,7 +279,7 @@ extern struct spi_dev_s *g_spi1; #ifdef CONFIG_STM32L4_SPI2 extern struct spi_dev_s *g_spi2; #endif -#ifdef HAVE_MMCSD +#ifdef HAVE_MMCSD_SDIO extern struct sdio_dev_s *g_sdio; #endif diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 7a0c2ad1152..68c4385e28e 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -153,7 +153,7 @@ int board_app_initialize(uintptr_t arg) } #endif -#ifdef HAVE_MMCSD +#ifdef HAVE_MMCSD_SDIO /* First, get an instance of the SDIO interface */ g_sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO);