PebbleOS v4.48.0-75-g7416f78a1
Loading...
Searching...
No Matches

Awinic AW8623X Vibration motor driver, driving an LRA in continuous mode. More...

Data Structures

struct  pbl_vibe_aw8623x_state
 AW8623X driver state, owned by the driver. More...
 
struct  pbl_vibe_aw8623x
 AW8623X haptic driver. More...
 

Macros

#define PBL_VIBE_AW8623X_DEFINE(sym, _bus, _addr, _reset, _supply)
 Define an AW8623X.
 

Detailed Description

Awinic AW8623X Vibration motor driver, driving an LRA in continuous mode.


Data Structure Documentation

◆ pbl_vibe_aw8623x_state

struct pbl_vibe_aw8623x_state

AW8623X driver state, owned by the driver.

Data Fields
uint8_t strength Drive strength, 0 to VIBE_STRENGTH_MAX.

◆ pbl_vibe_aw8623x

struct pbl_vibe_aw8623x

AW8623X haptic driver.

Data Fields
struct pbl_i2c_dev i2c I2C device.
struct pbl_gpio reset Reset line, active while the chip is held in reset.
struct pbl_vibe_aw8623x_state * state Driver state.
const struct pbl_regulator * supply Supply, or NULL.
struct pbl_vibe vibe Vibration motor, child of the I2C bus.

Macro Definition Documentation

◆ PBL_VIBE_AW8623X_DEFINE

#define PBL_VIBE_AW8623X_DEFINE (   sym,
  _bus,
  _addr,
  _reset,
  _supply 
)
Value:
static struct pbl_vibe_aw8623x_state sym##_aw8623x_state = {.strength = VIBE_STRENGTH_MAX}; \
PBL_DEVICE_INSTANCE(sym, struct pbl_vibe_aw8623x, struct pbl_vibe, vibe) { \
.vibe = PBL_VIBE_INIT(sym, "aw8623x", &(_bus)->dev, &pbl_vibe_aw8623x_ops, VIBE_STRENGTH_OFF), \
.state = &sym##_aw8623x_state, .i2c = PBL_I2C_DEV(_bus, _addr), .reset = _reset, \
.supply = (_supply), \
}
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:159
uint8_t strength
Drive strength, 0 to VIBE_STRENGTH_MAX.
Definition aw8623x.h:23
AW8623X haptic driver.
Definition aw8623x.h:27
AW8623X driver state, owned by the driver.
Definition aw8623x.h:21
Vibration motor.
Definition driver.h:44
#define PBL_VIBE_INIT(sym, _name, _parent, _ops, _braking_strength)
Initialize a struct pbl_vibe.
Definition driver.h:78
#define PBL_VIBE_STATE_DEFINE(sym)
Define the class state of a vibration motor.
Definition driver.h:65
#define VIBE_STRENGTH_MAX
Full power.
Definition vibe.h:27
#define VIBE_STRENGTH_OFF
Stopped.
Definition vibe.h:31

Define an AW8623X.

Parameters
symSymbol of the motor driver.
_busI2C bus.
_addr7-bit I2C address.
_resetReset line, from PBL_GPIO().
_supplySupply, or NULL.