I imlemnted the hardwar routins for the analog touch scrren as described in the manual (24.4 Touch screen driver), and it was easy and fun, saved me a lot of work and time.
These are working:
GUI_TOUCH_X_ActivateX(), GUI_TOUCH_X_ActivateY()
GUI_TOUCH_X_MeasureX(), GUI_TOUCH_X_MeasureY()
A call to GUI_TOUCH_Exec() is in a saparate thread (freeRTOS).
GUI_TOUCH_Calibrate() is called at initialization.
So I get this working just fine ( in the GUI_Task):
//---------
GUI_PID_GetState(&pState);
MULTIEDIT_SetText(hItem ,"");
MULTIEDIT_AddText(hItem,"X = ");
MULTIEDIT_AddText(hItem,int2str(pState.x,0));
MULTIEDIT_AddText(hItem,"\nY = ");
MULTIEDIT_AddText(hItem,int2str(pState.y,0));
if(pState.Pressed == 1)
MULTIEDIT_AddText(hItem,"\nPressed");
else
MULTIEDIT_AddText(hItem,"\nNOTPressed");
//-----------------
It displays the correct X,Y and state.
Whoever, no events are generated for the WM callback: static void _cbDialog(WM_MESSAGE * pMsg) ,
What am I missing?
Thanks
Johanan
These are working:
GUI_TOUCH_X_ActivateX(), GUI_TOUCH_X_ActivateY()
GUI_TOUCH_X_MeasureX(), GUI_TOUCH_X_MeasureY()
A call to GUI_TOUCH_Exec() is in a saparate thread (freeRTOS).
GUI_TOUCH_Calibrate() is called at initialization.
So I get this working just fine ( in the GUI_Task):
//---------
GUI_PID_GetState(&pState);
MULTIEDIT_SetText(hItem ,"");
MULTIEDIT_AddText(hItem,"X = ");
MULTIEDIT_AddText(hItem,int2str(pState.x,0));
MULTIEDIT_AddText(hItem,"\nY = ");
MULTIEDIT_AddText(hItem,int2str(pState.y,0));
if(pState.Pressed == 1)
MULTIEDIT_AddText(hItem,"\nPressed");
else
MULTIEDIT_AddText(hItem,"\nNOTPressed");
//-----------------
It displays the correct X,Y and state.
Whoever, no events are generated for the WM callback: static void _cbDialog(WM_MESSAGE * pMsg) ,
What am I missing?
Thanks
Johanan