PebbleOS v4.47.0-1219-g7c542d7a9
Loading...
Searching...
No Matches
ADBS-A320

Avago ADBS-A320 optical finger navigation sensor. More...

Data Structures

struct  pbl_adbs_a320
 ADBS-A320. More...
 

Macros

#define PBL_ADBS_A320_DEFINE(sym, _bus, _addr, _irq, _motion, _reset, _shutdown, _inverted_x, _inverted_y)
 Define and register an ADBS-A320.
 

Detailed Description

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.


Data Structure Documentation

◆ pbl_adbs_a320

struct pbl_adbs_a320

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.

Macro Definition Documentation

◆ 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); \
PBL_DEVICE_INSTANCE_DEV(sym, struct pbl_adbs_a320) { \
.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
ADBS-A320.
Definition adbs_a320.h:32

Define and register an ADBS-A320.

Parameters
symSymbol of the struct pbl_adbs_a320.
_busI2C bus.
_addr7-bit I2C address.
_irqMOTION interrupt, a struct pbl_irq_spec.
_motionMOTION level, a struct pbl_gpio.
_resetNRST, a struct pbl_gpio, or PBL_GPIO_NONE.
_shutdownSHTDWN, a struct pbl_gpio, or PBL_GPIO_NONE.
_inverted_xWhether X counts the other way round.
_inverted_yWhether Y counts the other way round.