diff options
Diffstat (limited to 'boards')
-rw-r--r-- | boards/OLIMEX_STM32_E407/board.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/boards/OLIMEX_STM32_E407/board.c b/boards/OLIMEX_STM32_E407/board.c index 7a3aaa4e2..586ae2453 100644 --- a/boards/OLIMEX_STM32_E407/board.c +++ b/boards/OLIMEX_STM32_E407/board.c @@ -56,9 +56,11 @@ void __early_init(void) { * Card detection through the card internal pull-up on D3.
*/
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+ static bool_t last_status = FALSE;
- (void)sdcp;
- return (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);
+ if (blkIsTransferring(sdcp))
+ return last_status;
+ return last_status = (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);
}
/*
|