Hello,
I got a stm f7 discovery board a few weeks ago and started using stemwin with it.
ST provides a very basic example that just displays hello world. After a bit of messing around with it I got some basic GUI stuff to work.
I wanted to use the touchscreen as the LCD on the discovery board has a nice capacitive touchscreen.
As I don't need multitouch I implemented the generic touch screen api.
The following code gets called ~100 times per second:
Display All
The code for the display is the graph example ( Graph widget 2 ) found here unchanged: segger.com/cms/admin/uploads/u…ples/src/WIDGET_GraphYT.c
The touchscreen works as I can move the cursor without any problems but after I moved the cursor for the first time the screen freezes. GUI_Exec(); blocks and because of that the graph stops getting any data and nothing on the screen updates. Except the cursor. even after the screen froze and it never gets out of the GUI_Exec(); routine I can still move the cursor.
What causes GUI_Exec(); to block?
Best regards,
Rik
I got a stm f7 discovery board a few weeks ago and started using stemwin with it.
ST provides a very basic example that just displays hello world. After a bit of messing around with it I got some basic GUI stuff to work.
I wanted to use the touchscreen as the LCD on the discovery board has a nice capacitive touchscreen.
As I don't need multitouch I implemented the generic touch screen api.
The following code gets called ~100 times per second:
C Source Code
- void BSP_Background(void)
- {
- TS_StateTypeDef TouchHandle;
- GUI_PID_STATE PidStage;
- BSP_TS_GetState(&TouchHandle);
- if(TouchHandle.touchDetected >= 1)
- {
- PidStage.Layer = 0;
- PidStage.Pressed = 1;
- PidStage.x = 480 - TouchHandle.touchX[0];
- PidStage.y = 272 - TouchHandle.touchY[0];
- GUI_TOUCH_StoreStateEx(&PidStage);
- WM_HandlePID();
- }
- else
- {
- PidStage.Layer = 0;
- PidStage.Pressed = 0;
- PidStage.x = -1;
- PidStage.y = -1;
- GUI_TOUCH_StoreStateEx(&PidStage);
- WM_HandlePID();
- }
- }
The code for the display is the graph example ( Graph widget 2 ) found here unchanged: segger.com/cms/admin/uploads/u…ples/src/WIDGET_GraphYT.c
The touchscreen works as I can move the cursor without any problems but after I moved the cursor for the first time the screen freezes. GUI_Exec(); blocks and because of that the graph stops getting any data and nothing on the screen updates. Except the cursor. even after the screen froze and it never gets out of the GUI_Exec(); routine I can still move the cursor.
What causes GUI_Exec(); to block?
Best regards,
Rik