How to enable touch screen interrupt in STM32H747I-DISCO board?
Hi,
I created a touch screen initialization function. The touch screen works just fine if a I poll the TS_State.TouchDetected flag. If I enable the touch interrupt from the initialization function I get a compiler error message:
uint32_t InitializeTouchScreen(void)
{
TS_Init_t hTS;
uint32_t ts_status;
hTS.Width = LCD_GetXSize(); //800;
hTS.Height = LCD_GetYSize(); //480;
hTS.Orientation = TS_SWAP_XY | TS_SWAP_Y;
hTS.Accuracy = 0;
ts_status = BSP_TS_Init(0, &hTS);
// Enable touch IT
BSP_TS_EnableIT(0);
return ts_status;
}The error message:
... stm32h747i_discovery_ts.c:252: undefined reference to `HAL_EXTI_GetHandle'...The "stm32Cube-bsp-drivers.pdf" manual does not help. It just lists the interrupt enable function but there is no explanation how to use it.
I also wonder how I can detect the touch interrupt (once it compiles). It is a GPIO pin in the HAL_GPIO_EXTI_Callback() callback function, GPIO PK.7, I guess:
// stm32h747I_discovery_ts.h line 88
#define TS_INT_PIN ((uint32_t)GPIO_PIN_7)
#define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOK)Thank you for your help!
Louis