Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ARM?? Cortex?? M4 Cookbook

You're reading from  ARM?? Cortex?? M4 Cookbook

Product type Book
Published in Mar 2016
Publisher Packt
ISBN-13 9781782176503
Pages 296 pages
Edition 1st Edition
Languages
Author (1):
Dr. Mark Fisher Dr. Mark Fisher
Profile icon Dr. Mark Fisher
Toc

Table of Contents (16) Chapters close

ARM Cortex M4 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
A Practical Introduction to ARM CORTEX C Language Programming Programming I/O Assembly Language Programming Data Conversion Multimedia Support Real-Time Signal Processing Real-Time Embedded Systems Embedded Toolchain Index

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"
  4. Define the following macros, global variables, and function prototypes:

    // The size of the touch-screen co-ordinates system.
    #define SCREEN_TS_WIDTH  4000
    #define SCREEN_TS_HEIGHT 4000
    
    #define wait_delay HAL_Delay
    
    /* Globals */
    extern GLCD_FONT...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime