BSP SD_DetectIRQHandler() doesn't work
I am trying to use BSP SD functions. One way to detect if SD card is inserted is with BSP_SD_IsDetected()
and another way is via interrupts w/ BSP_SD_ITConfig() .
The comments don't explicitly say which is the correct IRQ handler to use, but I'm pretty sure it is this macro I need:
&sharpdefine
SD_DetectIRQHandler
()
HAL_GPIO_EXTI_IRQHandler
(SD_DETECT_PIN)
Trying to use it in my project, it gives me following errors:
/home/..../Inc/stm32f7xx_hal_gpio.h:115:36: error: expected declaration specifiers or '...' before '(' token&sharpdefine GPIO_PIN_13 ((uint16_t)0x2000U) /* Pin 13 selected */^/home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery.h:168:46: note: in expansion of macro 'GPIO_PIN_13'&sharpdefine SD_DETECT_PIN GPIO_PIN_13^~~~~~~~~~~/home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_sd.h:104:68: note: in expansion of macro 'SD_DETECT_PIN'&sharpdefine SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(SD_DETECT_PIN)^~~~~~~~~~~~~src/interrupts.c:15:6: note: in expansion of macro 'SD_DetectIRQHandler'void SD_DetectIRQHandler()^~~~~~~~~~~~~~~~~~~Also this ''error-type'' shows up in my IDE, I don't know what it means though:

How can I detect SD Card presence with interrupts? What function should I implement as a IRQHandler for this event?
#sd #f7 #stm32f746-discovery #sd-card #bsp