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:

  1. Return to touchScreenDemo_c2v0 and open the project.
  2. Use the RTE manager to add Software ComponentBoard Support for the Graphic LCD (in addition to the Touchscreen). Click Resolve and then OK.
  3. Open 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" ...

Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.