Save current changes before reorganizing drivers and cleaning workspace

This commit is contained in:
Adolfo Reyna
2026-06-17 22:17:59 -04:00
parent 3356e5d4a2
commit 2813c11104
21 changed files with 2904 additions and 132 deletions
+12 -2
View File
@@ -78,8 +78,18 @@ class FT6336U:
return True
def is_touched(self):
"""Returns True if screen is touched (the active-low INT pin is pulled LOW)."""
return self.int() == 0
"""Returns True if screen is touched by checking the TD_STATUS register and clearing coordinates."""
if not self.initialized:
return False
td_status = self.read_reg(self.REG_TD_STATUS)
if td_status is None:
return False
touch_count = td_status[0] & 0x0F
if touch_count > 0 and touch_count < 3:
# Read P1 coordinates to clear register/interrupt state on the chip
self.read_reg(self.REG_P1_XH, 6)
return True
return False
def read_touch(self):
"""Reads touch point coordinates.