Fork with support for ILI9341 controller

Dependents:   CANary_9341 CANary

Fork of TOUCH_TFTx2 by Tick Tock

Files at this revision

API Documentation at this revision

Comitter:
TickTock
Date:
Sun Mar 03 15:49:34 2013 +0000
Parent:
8:fd0abf6a7f59
Child:
11:ce7ae1584207
Commit message:
added setcal function to bypass calibration

Changed in this revision

TOUCH_TFTx2.cpp Show annotated file Show diff for this revision Revisions of this file
TOUCH_TFTx2.h Show annotated file Show diff for this revision Revisions of this file
--- a/TOUCH_TFTx2.cpp	Fri Feb 22 23:23:34 2013 +0000
+++ b/TOUCH_TFTx2.cpp	Sun Mar 03 15:49:34 2013 +0000
@@ -175,6 +175,18 @@
     _ym = 1;            //drive y- high
 }
 
+void TOUCH_TFTx2::setcal(int _x0off, int _y0off, int _x0pp, int _y0pp, int _x1off, int _y1off, int _x1pp, int _y1pp, int _xmid) {
+        x0_off = _x0off;
+        y0_off = _y0off;
+        x0_pp = _x0pp;
+        y0_pp = _y0pp;
+        x1_off = _x1off;
+        y1_off = _y1off;
+        x1_pp = _x1pp;
+        y1_pp = _y1pp;
+        x_mid = _xmid;
+}
+
 void TOUCH_TFTx2::calibrate(void) {
     int i;
     int ulx0 = 0, uly0 = 0, brx0 = 0, bry0 = 0;
--- a/TOUCH_TFTx2.h	Fri Feb 22 23:23:34 2013 +0000
+++ b/TOUCH_TFTx2.h	Sun Mar 03 15:49:34 2013 +0000
@@ -48,6 +48,12 @@
      *
      * @returns point(x,y)
      */
+
+    void setcal(int _x0off, int _y0off, int _x0pp, int _y0pp, int _x1off, int _y1off, int _x1pp, int _y1pp, int _xmin);
+    /** set calibration values directly (bypass calibration)
+    *
+    */
+
     point get_touch(void);
     
     /** calculate coord on screen