PebbleOS v4.47.0-327-g7753e801d
Loading...
Searching...
No Matches

Touchscreen driver for the FocalTech FT6x36 family, such as the FT6236 and the FT6146. More...

Data Structures

struct  pbl_ft6236
 FT6x36. More...
 

Macros

#define PBL_FT6236_DEFINE(sym, _bus, _addr, _irq, _reset, _size_x, _size_y, _inverted_x, _inverted_y, _swapped_x_y, _pinctrl)
 Define an FT6x36.
 

Detailed Description

Touchscreen driver for the FocalTech FT6x36 family, such as the FT6236 and the FT6146.

Reports the first contact. The chip pulses its interrupt line low for each sample while touched, and once more on release. It sleeps in hibernation while the touchscreen is off, out of which only a reset wakes it.


Data Structure Documentation

◆ pbl_ft6236

struct pbl_ft6236

FT6x36.

Data Fields
struct pbl_i2c_dev i2c I2C device.
struct pbl_irq_spec irq Interrupt, pulsed low by the chip.
struct pbl_pinctrl pinctrl Pin states, the default one for the interrupt line.
struct pbl_gpio reset Reset line, active while the chip is held in reset.
struct pbl_ft6236_state * state Driver state.
struct pbl_touch touch Touchscreen, child of the I2C bus.

Macro Definition Documentation

◆ PBL_FT6236_DEFINE

#define PBL_FT6236_DEFINE (   sym,
  _bus,
  _addr,
  _irq,
  _reset,
  _size_x,
  _size_y,
  _inverted_x,
  _inverted_y,
  _swapped_x_y,
  _pinctrl 
)
Value:
static struct pbl_ft6236_state sym##_ft6236_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_ft6236, struct pbl_touch, touch) { \
.touch = PBL_TOUCH_INIT(sym, "ft6236", &(_bus)->dev, &pbl_ft6236_ops, .size_x = (_size_x), \
.size_y = (_size_y), .inverted_x = (_inverted_x), \
.inverted_y = (_inverted_y), .swapped_x_y = (_swapped_x_y)), \
.state = &sym##_ft6236_state, .i2c = PBL_I2C_DEV(_bus, _addr), .irq = _irq, .reset = _reset, \
.pinctrl = PBL_PINCTRL(_pinctrl, nullptr, 0), \
}
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:136
#define PBL_PINCTRL(_default, _sleep, _reg)
Initializer for a struct pbl_pinctrl.
Definition pinctrl.h:131
FT6x36.
Definition ft6236.h:38
Touchscreen.
Definition touch.h:88
#define PBL_TOUCH_INIT(sym, _name, _parent, _ops,...)
Initialize a struct pbl_touch.
Definition touch.h:135
#define PBL_TOUCH_STATE_DEFINE(sym)
Define the class state of a touchscreen.
Definition touch.h:122

Define an FT6x36.

Parameters
symSymbol of the touchscreen.
_busI2C bus.
_addr7-bit I2C address.
_irqInterrupt, from PBL_IRQ_SPEC().
_resetReset line, from PBL_GPIO().
_size_xNumber of X coordinates it reports.
_size_yNumber of Y coordinates it reports.
_inverted_xX axis is inverted.
_inverted_yY axis is inverted.
_swapped_x_yX and Y axes are swapped.
_pinctrlDefault pin state, for the interrupt line, or NULL.