summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-02-01 15:02:04 +1100
committerDamien George <damien.p.george@gmail.com>2018-02-01 15:02:04 +1100
commit467a5926bc57549f36055938b8bbf7f9bf0dd101 (patch)
tree553eb2f80c4cd1765b16bf5c4edd4d274f511046
parent9e7d2c7abb06a850c664e24b7d8fe5aafee4e443 (diff)
stm32/sdcard: Only define IRQ handler if using SDMMC1 peripheral.
So that the IRQ can be used by other peripheral drivers if needed.
-rw-r--r--ports/stm32/sdcard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/sdcard.c b/ports/stm32/sdcard.c
index 46f08f78f..b8a73daaf 100644
--- a/ports/stm32/sdcard.c
+++ b/ports/stm32/sdcard.c
@@ -227,11 +227,13 @@ uint64_t sdcard_get_capacity_in_bytes(void) {
return (uint64_t)cardinfo.LogBlockNbr * (uint64_t)cardinfo.LogBlockSize;
}
+#if !defined(MICROPY_HW_SDMMC2_CK)
void SDIO_IRQHandler(void) {
IRQ_ENTER(SDIO_IRQn);
HAL_SD_IRQHandler(&sd_handle);
IRQ_EXIT(SDIO_IRQn);
}
+#endif
#if defined(MCU_SERIES_F7)
void SDMMC2_IRQHandler(void) {