Adding driver for four-wire resistive touchscreen (#118)

* resistive: Adding driver for four-wire resistive touchscreen, as used on the Adafruit PyPortal.
This commit is contained in:
BCG
2020-01-28 12:55:31 -05:00
committed by Ron Evans
parent 6716bb6c0a
commit d43263f764
6 changed files with 411 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package touch
// Pointer is a device that is capable of reading a single touch point
type Pointer interface {
ReadTouchPoint() Point
}
// Point represents the result of reading a single touch point from a screen.
// X and Y are the horizontal and vertical coordinates of the touch, while Z
// represents the touch pressure. In general, client code will want to inspect
// the value of Z to see if it is above some threshold to determine if a touch
// is detected at all.
type Point struct {
X int
Y int
Z int
}