Skip to content

Commit 60dd5a8

Browse files
committed
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.
1 parent ccd3013 commit 60dd5a8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

ports/stm/common-hal/sdioio/SDCard.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,6 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
148148
GPIO_InitStruct.Pin = pin_mask(clock->number);
149149
HAL_GPIO_Init(pin_port(clock->port), &GPIO_InitStruct);
150150

151-
// XXX hard coded pin
152-
#define SD_DETECT_PIN GPIO_PIN_12
153-
#define SD_DETECT_GPIO_PORT GPIOB
154-
155-
/*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */
156-
GPIO_InitStruct.Pin = SD_DETECT_PIN;
157-
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
158-
GPIO_InitStruct.Pull = GPIO_PULLUP;
159-
HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStruct);
160-
161151
__HAL_RCC_SDIO_CLK_ENABLE();
162152

163153
self->handle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV;

0 commit comments

Comments
 (0)