Template for working forward

Dependencies:   mbed PinDetect

Revision:
1:402b32a1025f
Parent:
0:6beb6f498640
Child:
2:ad262f2c84ca
diff -r 6beb6f498640 -r 402b32a1025f main.cpp
--- a/main.cpp	Mon Aug 09 14:17:02 2010 +0000
+++ b/main.cpp	Tue Nov 19 10:04:48 2019 +0000
@@ -1,8 +1,37 @@
+/* Hello World! for the TextLCD Enhanced Library*/
+
 #include "mbed.h"
-#include "TextLCD.h"
+#include "GUI.h"
+#include "cy8ckit_028_tft.h"
+
+void Display_Init(void)
+{
+
+    /* Set font size, foreground and background Colours */
+    GUI_SetFont(GUI_FONT_16B_1);
+    GUI_SetColor(GUI_WHITE);
+    GUI_SetBkColor(GUI_BLACK);
 
-TextLCD lcd(p9, p10);
+    /* Clear screen and print splash screen */
+    GUI_Clear();
+    GUI_SetTextAlign(GUI_TA_HCENTER);
+    GUI_DispStringAt("TFT Demo", 160, 20);
+}
+
+int main()
+{
+    /* Initialise EmWin driver*/
+    GUI_Init();
 
-int main() {
-    lcd.printf("Hi mbed World!\n");
+    /* Initialise display */
+    Display_Init();
+
+
+    GUI_SetFont(GUI_FONT_8X16X2X2);
+        GUI_SetTextAlign(GUI_TA_HCENTER);
+        GUI_DispStringAt("Hello World!", 160, 200);
+
 }
+
+
+