jepjaee

Dependents:   MIDI_Interface_ver_1

Fork of Touch_tft by Peter Drescher

Revision:
3:ef67f9068850
Parent:
2:ef7972c29c0e
Child:
4:cef5cdc775ea
--- a/touch_tft.cpp	Sun Sep 04 21:23:31 2011 +0000
+++ b/touch_tft.cpp	Thu Jan 16 07:47:42 2014 +0000
@@ -19,13 +19,12 @@
 #define threshold 0x2000  // threshold to detect pressed 
 
 touch_tft::touch_tft(PinName xp, PinName xm, PinName yp, PinName ym,
-                     PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset,const char* name):
+                     PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset, PinName dc, const char* name):
         _xp(xp),_xm(xm),_yp(yp),_ym(ym),_ax(xp),_ay(yp),
-        SPI_TFT(mosi,miso,sclk,cs,reset,name) {
+        SPI_TFT_ILI9341(mosi,miso,sclk,cs,reset,dc,name) {
     xa = xp;
-    ya = yp;
+    ya = yp;    }
 
-}
 
 point touch_tft::get_touch() {
     unsigned short x1 = 0,x2 = 0, y1 = 0, y2 = 0;
@@ -124,9 +123,9 @@
     pos_y = pos_y * font[2];
 
     locate(pos_x,pos_y);
-    printf("press cross");
+    printf("paina ruksia");
     locate(pos_x,pos_y + font[2]);
-    printf("to calibrate");
+    printf("kalibroidaksesi");
     for (i=0; i<5; i++) {
         do {
             p = get_touch();
@@ -146,9 +145,9 @@
     line(width() -5, height() - 8,width() - 5,height() -1,White);   // paint cross
     line(width() - 8,height() - 5,width() - 1,height() - 5,White);
     locate(pos_x,pos_y);
-    printf("press cross");
+    printf("paina ruksia");
     locate(pos_x,pos_y + font[2]);
-    printf("to calibrate");
+    printf("kalibroidaksesi");
     for (i=0; i<5; i++) {
         do {
             p  = get_touch();