ft6336

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package ft6336 provides a driver for the FT6336 I2C Self-Capacitive touch panel controller.

Datasheet: https://focuslcds.com/content/FT6236.pdf

Index

Constants

View Source
const (
	Address = 0x38

	RegPeriodActive = 0x88
	RegGMode        = 0xA4
	RegFirmid       = 0xA6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

Config contains settings for FT6636.

type Device

type Device struct {
	Address uint8
	// contains filtered or unexported fields
}

Device wraps FT6336 I2C Self-Capacitive touch

func New

func New(i2c drivers.I2C, intPin machine.Pin) *Device

New returns FT6336 device for the provided I2C bus using default address.

func (*Device) Configure

func (d *Device) Configure(config Config) error

Configure the FT6336 device.

func (*Device) GetFirmwareID

func (d *Device) GetFirmwareID() uint8

GetFirmwareID gets firmware version.

func (*Device) GetGMode

func (d *Device) GetGMode() uint8

GetGMode gets interrupt mode.

func (*Device) GetPeriodActive

func (d *Device) GetPeriodActive() uint8

GetPeriodActive gets report rate in Active mode.

func (*Device) Read

func (d *Device) Read() []byte

Read reads the registers.

func (*Device) ReadTouchPoint

func (d *Device) ReadTouchPoint() touch.Point

ReadTouchPoint reads a single touch.Point from the device. The maximum value for each touch.Point is 0xFFFF.

func (*Device) SetGMode

func (d *Device) SetGMode(v uint8)

SetGMode sets interrupt mode.

0x00 : Interrupt Polling mode
0x01 : Interrupt Trigger mode (default)

func (*Device) SetPeriodActive

func (d *Device) SetPeriodActive(v uint8)

SetPeriodActive sets report rate in Active mode.

func (*Device) Touched

func (d *Device) Touched() bool

Touched returns if touched or not.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL