stm32/sdcard: Use mp_hal_pin_input instead of HAL function.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
eef7eae6b2
commit
7a9cf1f0fb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user