stm32/sdcard: Use mp_hal_pin_input instead of HAL function.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-03-17 17:07:49 +11:00
parent eef7eae6b2
commit 7a9cf1f0fb

View File

@ -249,7 +249,7 @@ bool sdcard_is_present(void) {
}
#endif
#if defined(MICROPY_HW_SDCARD_DETECT_PIN)
return HAL_GPIO_ReadPin(MICROPY_HW_SDCARD_DETECT_PIN->gpio, MICROPY_HW_SDCARD_DETECT_PIN->pin_mask) == MICROPY_HW_SDCARD_DETECT_PRESENT;
return mp_hal_pin_read(MICROPY_HW_SDCARD_DETECT_PIN) == MICROPY_HW_SDCARD_DETECT_PRESENT;
#else
return true;
#endif