From 60dd5a8d7db5700ea886dc54988e2ed9502ac8c4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 23 Jul 2020 18:08:45 -0500 Subject: stm: sdioio: remove unused code related to "SD Card detect pin" .. this probably came from the examples that I studied at the beginning of implementation. The card detection feature is unused. As a "detect pin" is not sent from the shared-bindings, there is no way to get the correct pin anyway. Instead, if code needs to detect the insertion state it can directly use the pin as GPIO in Python code. --- ports/stm/common-hal/sdioio/SDCard.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ports/stm/common-hal/sdioio/SDCard.c b/ports/stm/common-hal/sdioio/SDCard.c index a1e87ec4e..32b1e01be 100644 --- a/ports/stm/common-hal/sdioio/SDCard.c +++ b/ports/stm/common-hal/sdioio/SDCard.c @@ -148,16 +148,6 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, GPIO_InitStruct.Pin = pin_mask(clock->number); HAL_GPIO_Init(pin_port(clock->port), &GPIO_InitStruct); -// XXX hard coded pin -#define SD_DETECT_PIN GPIO_PIN_12 -#define SD_DETECT_GPIO_PORT GPIOB - - /*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */ - GPIO_InitStruct.Pin = SD_DETECT_PIN; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; - HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStruct); - __HAL_RCC_SDIO_CLK_ENABLE(); self->handle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV; -- cgit v1.2.3