PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches

Hynitron CST816 touch controller. More...

Data Structures

struct  pbl_cst816
 CST816. More...
 

Macros

#define PBL_CST816_DEFINE(sym, _bus, _addr, _irq, _reset, _size_x, _size_y, _pinctrl)
 Define a CST816.
 

Detailed Description

Hynitron CST816 touch controller.

The chip pulses its interrupt line low when it has a sample or a gesture. It sleeps when the touchscreen is disabled, and is reflashed at init when its firmware is not the bundled one.


Data Structure Documentation

◆ pbl_cst816

struct pbl_cst816

CST816.

Data Fields
struct pbl_i2c_dev i2c I2C device in normal operation.
struct pbl_i2c_dev i2c_boot I2C device of the bootloader, used to update the firmware.
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_cst816_state * state Driver state.
struct pbl_touch touch Touchscreen, child of the I2C bus.

Macro Definition Documentation

◆ PBL_CST816_DEFINE

#define PBL_CST816_DEFINE (   sym,
  _bus,
  _addr,
  _irq,
  _reset,
  _size_x,
  _size_y,
  _pinctrl 
)
Value:
static struct pbl_cst816_state sym##_cst816_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_cst816, struct pbl_touch, touch) { \
.touch = PBL_TOUCH_INIT(sym, "cst816", &(_bus)->dev, &pbl_cst816_ops, .size_x = (_size_x), \
.size_y = (_size_y)), \
.state = &sym##_cst816_state, .i2c = PBL_I2C_DEV(_bus, _addr), \
.i2c_boot = PBL_I2C_DEV(_bus, PBL_CST816_BOOT_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:132
CST816.
Definition cst816.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 a CST816.

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.
_pinctrlDefault pin state, for the interrupt line, or NULL.