mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
d43263f764
* resistive: Adding driver for four-wire resistive touchscreen, as used on the Adafruit PyPortal.
18 lines
518 B
Go
18 lines
518 B
Go
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
|
|
}
|