Avago ADBS-A320 optical finger navigation sensor.
More...
|
| #define | PBL_ADBS_A320_DEFINE(sym, _bus, _addr, _irq, _motion, _reset, _shutdown, _inverted_x, _inverted_y) |
| | Define and register an ADBS-A320.
|
| |
Avago ADBS-A320 optical finger navigation sensor.
The motion of a finger over the sensor is reported as PBL_INPUT_REL_X and PBL_INPUT_REL_Y steps, in the sensor's counts.
◆ pbl_adbs_a320
| Data Fields |
|
struct pbl_device |
dev |
Device, child of the I2C bus. |
|
struct pbl_i2c_dev |
i2c |
I2C device. |
|
bool |
inverted_x |
X counts the other way round, avago,inverted-x. |
|
bool |
inverted_y |
Y counts the other way round, avago,inverted-y. |
|
struct pbl_irq_spec |
irq |
MOTION interrupt. |
|
struct pbl_gpio |
motion |
MOTION level. |
|
struct pbl_gpio |
reset |
NRST, reset-gpios, if connected. |
|
struct pbl_gpio |
shutdown |
SHTDWN, shutdown-gpios, if connected. |
|
struct pbl_adbs_a320_state * |
state |
Runtime state. |
◆ PBL_ADBS_A320_DEFINE
| #define PBL_ADBS_A320_DEFINE |
( |
|
sym, |
|
|
|
_bus, |
|
|
|
_addr, |
|
|
|
_irq, |
|
|
|
_motion, |
|
|
|
_reset, |
|
|
|
_shutdown, |
|
|
|
_inverted_x, |
|
|
|
_inverted_y |
|
) |
| |
Value: static struct pbl_adbs_a320_state sym##_adbs_a320_state; \
PBL_DEVICE_STATE_DEFINE(sym); \
.dev =
PBL_DEVICE_INIT(sym,
"adbs_a320", pbl_adbs_a320_init, &(_bus)->dev), \
.i2c =
PBL_I2C_DEV(_bus, _addr), .irq = _irq, .motion = _motion, .reset = _reset, \
.shutdown = _shutdown, .inverted_x = (_inverted_x), .inverted_y = (_inverted_y), \
.state = &sym##_adbs_a320_state, \
}
#define PBL_DEVICE_INIT(sym, _name, _init, _parent)
Initializer for the struct pbl_device of device instance sym.
Definition device.h:169
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:136
Define and register an ADBS-A320.
- Parameters
-
| sym | Symbol of the struct pbl_adbs_a320. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |
| _irq | MOTION interrupt, a struct pbl_irq_spec. |
| _motion | MOTION level, a struct pbl_gpio. |
| _reset | NRST, a struct pbl_gpio, or PBL_GPIO_NONE. |
| _shutdown | SHTDWN, a struct pbl_gpio, or PBL_GPIO_NONE. |
| _inverted_x | Whether X counts the other way round. |
| _inverted_y | Whether Y counts the other way round. |