Hi Segger Community,
In my GUI, i'm trying to navigate between windows using gestures.
In my understanding, gestures are managed by the multitouch module.
Unfortunately there is no informations nor examples on how to implement the function GUI_MTOUCH_StoreEvent()
My guess is that this function need to be implemented in the same place than the GUI_TOUCH_StoreState(), aka inside the touch controller function.
but when i call the GUI_MTOUCH_StoreEvent() function, the system goes in hardfault
here is my code (interruption coming from the touchscreen controller when a touch is detected)
[C]void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
GUI_MTOUCH_EVENT pEvent;
GUI_MTOUCH_INPUT pInput[2];
if(GPIO_Pin == GPIO_PIN_15) /* if interrupt is from touchscreen */
{
touchscreen_get_coordinates(&pEvent.NumPoints,&pInput[0].x,&pInput[0].y,&pInput[1].x,&pInput[1].y);
pEvent.TimeStamp = GUI_GetTime();
pInput[0].Id = 0;
pInput[0].Flags = GUI_MTOUCH_FLAG_DOWN;
pInput[1].Id = 1;
pInput[1].Flags = GUI_MTOUCH_FLAG_DOWN;
GUI_TOUCH_StoreState(pInput[0].x, pInput[0].y);
GUI_MTOUCH_StoreEvent(&pEvent,pInput);
}
}[/C]
also, GUI_MTOUCH_Enable(1) & WM_GESTURE_Enable(1) are enabled right after GUI_Init()
i'm using the STemWin lib 5.40 given by STMicroelectronics on a STM32L486 target
Do you have any example on how to implement this function and use a swipe gesture to navigate trough screens ?
best regards,
greffeb
In my GUI, i'm trying to navigate between windows using gestures.
- WINDOW 1 => BUTTON PRESS => WINDOW 2 => SWIPE RIGHT (pan gesture) => WINDOW 1
In my understanding, gestures are managed by the multitouch module.
Unfortunately there is no informations nor examples on how to implement the function GUI_MTOUCH_StoreEvent()
My guess is that this function need to be implemented in the same place than the GUI_TOUCH_StoreState(), aka inside the touch controller function.
but when i call the GUI_MTOUCH_StoreEvent() function, the system goes in hardfault
here is my code (interruption coming from the touchscreen controller when a touch is detected)
[C]void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
GUI_MTOUCH_EVENT pEvent;
GUI_MTOUCH_INPUT pInput[2];
if(GPIO_Pin == GPIO_PIN_15) /* if interrupt is from touchscreen */
{
touchscreen_get_coordinates(&pEvent.NumPoints,&pInput[0].x,&pInput[0].y,&pInput[1].x,&pInput[1].y);
pEvent.TimeStamp = GUI_GetTime();
pInput[0].Id = 0;
pInput[0].Flags = GUI_MTOUCH_FLAG_DOWN;
pInput[1].Id = 1;
pInput[1].Flags = GUI_MTOUCH_FLAG_DOWN;
GUI_TOUCH_StoreState(pInput[0].x, pInput[0].y);
GUI_MTOUCH_StoreEvent(&pEvent,pInput);
}
}[/C]
also, GUI_MTOUCH_Enable(1) & WM_GESTURE_Enable(1) are enabled right after GUI_Init()
i'm using the STemWin lib 5.40 given by STMicroelectronics on a STM32L486 target
Do you have any example on how to implement this function and use a swipe gesture to navigate trough screens ?
best regards,
greffeb