Andrew Reed / Mbed 2 deprecated CITY1082-TFT-basic

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* Hello World! for the TextLCD Enhanced Library*/
00002 
00003 #include "mbed.h"
00004 #include "GUI.h"
00005 #include "cy8ckit_028_tft.h"
00006 
00007 void Display_Init(void)
00008 {
00009 
00010     /* Set font size, foreground and background Colours */
00011     GUI_SetFont(GUI_FONT_16B_1);
00012     GUI_SetColor(GUI_WHITE);
00013     GUI_SetBkColor(GUI_BLACK);
00014 
00015     /* Clear screen and print splash screen */
00016     GUI_Clear();
00017     GUI_SetTextAlign(GUI_TA_HCENTER);
00018     GUI_DispStringAt("TFT Demo", 160, 20);
00019 }
00020 
00021 int main()
00022 {
00023     /* Initialise EmWin driver*/
00024     GUI_Init();
00025 
00026     /* Initialise display */
00027     Display_Init();
00028 
00029 
00030     GUI_SetFont(GUI_FONT_8X16X2X2);
00031         GUI_SetTextAlign(GUI_TA_HCENTER);
00032         GUI_DispStringAt("Hello World!", 160, 200);
00033 
00034 }
00035 
00036 
00037