Documentation ¶
Overview ¶
Package ttp229 is for the 16 keys or 8 keys touch pad detector IC Datasheet (BSF version): https://www.sunrom.com/download/SUNROM-TTP229-BSF_V1.1_EN.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buser ¶
type Buser interface {
// contains filtered or unexported methods
}
Buser interface since there are different versions with different protocols
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device wraps a connection to a TTP229 device.
func NewPin ¶
NewPin creates a new TTP229 connection through 2 machine.Pin, this is suitable for the BSF variant of the TTP229.
func (*Device) Configure ¶
func (d *Device) Configure(cfg Configuration) bool
Configure sets up the device for communication
func (*Device) GetKey ¶
GetKey returns the current pressed key (only returns one key, even in multitouch mode)
func (*Device) IsKeyDown ¶
IsKeyDown returns true if the given key was just pressed (and it wasn't previously)
func (*Device) IsKeyPressed ¶
IsKeyPressed returns true if the given key is pressed