TFT Example Code:
I have taken this example from Cypress Website which is named as "CE223726 – PSoC 6 TFT Display Interface with EmWin Graphics Library"
This code example demonstrates how to display graphics on a TFT display using EmWin Graphics Display Library. EmWin graphics library implements 2D graphics and provides easy-to-use API functions to display text, 2D graphics (lines, rectangles, circles, etc.), and bitmap images. In PSoC Creator, EmWin graphics library is implemented as a PDL middleware library.
1. Connect the Pioneer Board to your PC using the provided USB cable through the USB connector (J10).
2. Program the Pioneer Board with the CE23726_EmWin_TFT_Display_ST7789 project. See the CY8CKIT-062-BLE kit guide for details on how to program firmware into the device. The TFT display shows the startup screen for three seconds, followed by a screen that displays instructions to press SW2 to scroll through various demo pages.
Press SW2 to advance through the following pages that demonstrate various graphics features in EmWin.
• Text alignments, styles, and modes
• Text colors
• Normal fonts of various sizes
• Bold fonts of various sizes
• Color bars
• 2D graphics with vertical lines, horizontal lines, arcs, and rectangles
• 2D graphics with concentric circles and ellipses and rectangles with gradient fills
• Concentric circles
Note: If after click on generate application if any pop-up come with a couple of files to remove and says that this is out-dated then Deselect the file (it is deselected by default), and click Replace. If you select the file and click Replace, the configuration file in the code example project will be replaced by the default configuration file.
After the successful build process click to Debug >> Program and by selecting your device upload this code to your PSoC 6.