TOUCHSCREEN basic example for DISCO_F769NI
Dependencies: BSP_DISCO_F769NI
Diff: main.cpp
- Revision:
- 2:2becc6f12303
- Parent:
- 0:cc2802bc7c1b
--- a/main.cpp Wed Jun 07 11:47:45 2017 +0000 +++ b/main.cpp Fri Nov 15 15:10:07 2019 +0100 @@ -13,6 +13,7 @@ BSP_LCD_Init(); BSP_LCD_LayerDefaultInit(0, LCD_FB_START_ADDRESS); + BSP_LCD_SelectLayer(0); /* Touchscreen initialization */ if (BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize()) == TS_ERROR) { @@ -32,7 +33,7 @@ while (1) { BSP_TS_GetState(&TS_State); - if(TS_State.touchDetected) { + if (TS_State.touchDetected) { /* One or dual touch have been detected */ /* Get X and Y position of the first touch post calibrated */ @@ -43,7 +44,7 @@ BSP_LCD_SetTextColor(LCD_COLOR_BLUE); BSP_LCD_FillCircle(x1, y1, 20); - wait_ms(10); + HAL_Delay(100); } } }