LPC1768 Mini-DK board with 2.8" SPI TFT and SPI touch

Dependencies:   Mini-DK SDFileSystem mbed

Fork of LPC1768_Mini-DK by Frank Vannieuwkerke

Revision:
3:fb4d62b5ffb3
Parent:
2:d0acbd263ec7
Child:
4:067633a7dfa5
--- a/main.cpp	Thu Jan 03 10:54:09 2013 +0000
+++ b/main.cpp	Thu Jan 03 16:16:24 2013 +0000
@@ -9,13 +9,8 @@
 DigitalOut led(DK_LED1);
 // TFT -> mosi, miso, sclk, cs
 SPI_TFT TFT(LCD_SDI, LCD_SDO, LCD_SCK, LCD_CS,"TFT");
-// ADS7843 -> mosi, miso, sclk, cs, irq
-TouchScreenADS7843 TP(TP_SDI ,TP_SDO ,TP_SCK ,TP_CS ,TP_IRQ);
-
-// (To be modified) put these global vars back in Touch.cpp/Touch.h 
-//Matrix      matrix;
-//Coordinate  display;
-//Coordinate  screen;
+// ADS7843 -> mosi, miso, sclk, cs, irq, SPI_TFT
+TouchScreenADS7843 TP(TP_SDI ,TP_SDO ,TP_SCK ,TP_CS ,TP_IRQ, &TFT);
 
 int main()
 {
@@ -129,7 +124,7 @@
     TP.TouchPanel_Calibrate();
     TFT.set_font((unsigned char*) Arial12x12);
     TFT.set_orientation(0);
-    TFT.cls();
+//    TFT.cls();
     TFT.locate(0,0);
     TFT.printf(" X:");
     TFT.locate(70,0);
@@ -138,12 +133,12 @@
     {
         if (!TP._tp_irq)
         {
-            Ads7846_status = TP.Read_Ads7846(&TP.screen);
+            Ads7846_status = TP.Read_Ads7846();
             if (Ads7846_status)
             {
                 TP.getDisplayPoint() ;
-//                TP.TP_DrawPoint(display.x,display.y, Blue);
-                TFT.rect(TP.display.x,TP.display.y,1,1,Red);
+                TP.TP_DrawPoint(TP.display.x,TP.display.y, Blue);
+//                TFT.rect(TP.display.x,TP.display.y,1,1,Red);
                 TFT.locate(25,0);
                 printf("%03d",TP.display.x);
                 TFT.locate(95,0);