Example that shows how to use emWin. This example is based on NXP's POS demo available at lpcware.com

Dependencies:   EALib ewgui mbed

Revision:
0:2052561807c5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 16 10:58:05 2013 +0000
@@ -0,0 +1,69 @@
+
+/******************************************************************************
+ * Includes
+ *****************************************************************************/
+
+#include "mbed.h"
+
+#include "sdram.h"
+
+#include "EwGuiImpl.h"
+
+
+
+/******************************************************************************
+ * Typedefs and defines
+ *****************************************************************************/
+
+
+/******************************************************************************
+ * Local variables
+ *****************************************************************************/
+
+
+/******************************************************************************
+ * Local functions
+ *****************************************************************************/
+
+static EwGuiImpl* gui = NULL;
+
+static void pollTouch() {
+    if (gui == NULL) return;
+
+    gui->execTouch();
+}
+
+/******************************************************************************
+ * Main function
+ *****************************************************************************/
+
+int main (void) {
+
+    Ticker ticker;
+    
+    // Frame buffer is put in SDRAM
+    if (sdram_init() == 1) {
+        printf("Failed to initialize SDRAM\n");
+        return 1;
+    }
+
+
+    // instantiate and initialize GUI
+    gui = new EwGuiImpl();
+
+    // calibrate touch screen
+    gui->calibrate();
+    
+    ticker.attach(&pollTouch, 0.05);
+
+
+    MainTask();
+
+    // application loop running the UI and checking for touch events
+    while(1) {
+        gui->exec();
+        //gui.execTouch();
+    }
+
+
+}