O'Reilly logo

ARM® Cortex® M4 Cookbook by Dr. Mark Fisher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required