Hynitron CST816 touch controller.
More...
|
| #define | PBL_CST816_DEFINE(sym, _bus, _addr, _irq, _reset, _size_x, _size_y, _pinctrl) |
| | Define a CST816.
|
| |
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.
◆ pbl_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. |
◆ 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; \
.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, \
}
#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
-
| sym | Symbol of the touchscreen. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |
| _irq | Interrupt, from PBL_IRQ_SPEC(). |
| _reset | Reset line, from PBL_GPIO(). |
| _size_x | Number of X coordinates it reports. |
| _size_y | Number of Y coordinates it reports. |
| _pinctrl | Default pin state, for the interrupt line, or NULL. |