How to use the LCD touchscreen
The LCD touchscreen used by the MCBSTM32F400 evaluation board is a resistive film giving a resolution of 4000 × 4000 (that is, far greater than the GLCD). This recipe extends
touchScreenDemo_c2v0 and illustrates how to use the LCD touchscreen.
How to do it…
Perform the following steps to use the LCD touchscreen:
- Return to
touchScreenDemo_c2v0and open the project.
- Use the RTE manager to add Software Component → Board Support for the Graphic LCD (in addition to the Touchscreen). Click Resolve and then OK.
touchScreenDemo.c, and include the following headers:
#include <stdio.h> #include "stm32f4xx_hal.h" #include "cmsis_os.h" #include "Driver_I2C.h" #include "Board_GLCD.h" #include "GLCD_Config.h" #include "Board_Touch.h" ...