808

Dependents:   Chromatograph_Mobile

Revision:
13:5959af2ac87a
Parent:
10:6a81aeca25e3
diff -r f0980f7a75ae -r 5959af2ac87a src/FT_Hal_Utils.cpp
--- a/src/FT_Hal_Utils.cpp	Sat Aug 08 18:30:58 2020 +0000
+++ b/src/FT_Hal_Utils.cpp	Tue Sep 01 10:52:05 2020 +0000
@@ -1412,7 +1412,7 @@
     // REG_TOUCH_TAG_XY 
     // Because the tag lookup takes a full frame, and touch coordinates change continuously,
     // the original (x; y) used for the tag lookup is also available in REG_TOUCH_TAG_XY.
-    uint32_t TagRegisterVal = Rd32(REG_TOUCH_TAG_XY);       // check if one of the tracking fields is touched
+    uint32_t TagRegisterVal = Rd32(REG_TOUCH_SCREEN_XY);       // check if one of the tracking fields is touched
     return (TagRegisterVal >> 16) & 0xffff;
 }
 
@@ -1428,6 +1428,17 @@
     return TagRegisterVal & 0xffff;
 }
 
+uint32_t FT813::GetTouchTagXY(void)
+{
+    // REG_TOUCH_TAG
+    // If the screen is being touched, the screen coordinates are looked up in the screen's tag buffer,
+    // delivering a final 8-bit tag value, in REG_TOUCH_TAG.
+    // REG_TOUCH_TAG_XY 
+    // Because the tag lookup takes a full frame, and touch coordinates change continuously,
+    // the original (x; y) used for the tag lookup is also available in REG_TOUCH_TAG_XY.
+    return Rd32(REG_TOUCH_SCREEN_XY);       // check if one of the tracking fields is touched     
+}
+
 uint16_t FT813::GetTouchConfig(void)
 {
     // Read 0x0381