|
PebbleOS
|
Awinic AW86225 Vibration motor driver. More...
Data Structures | |
| struct | pbl_aw86225_state |
| AW86225 driver state, owned by the driver. More... | |
| struct | pbl_aw86225 |
| AW86225 haptic driver. More... | |
Macros | |
| #define | PBL_AW86225_DEFINE(sym, _bus, _addr, _reset) |
| Define an AW86225. | |
Awinic AW86225 Vibration motor driver.
Plays a sine cycle at the LRA's resonant frequency from the chip's RAM in an infinite loop, with the gain compensated for the supply voltage. The LRA is described by the CONFIG_VIBE_AW86225_* options.
| struct pbl_aw86225_state |
AW86225 driver state, owned by the driver.
| Data Fields | ||
|---|---|---|
| bool | playing | Playback running. |
| uint8_t | strength | Drive strength, 0 to VIBE_STRENGTH_MAX. |
| uint8_t | trim_lra | Resonant frequency trim. |
| bool | trim_valid | trim_lra holds a calibration. |
| uint16_t | vbat_mv | Supply voltage measured before the last playback, in mV, or 0 if not measured. |
| struct pbl_aw86225 |
AW86225 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_aw86225_state * | state | Driver state. |
| struct pbl_vibe | vibe | Vibration motor, child of the I2C bus. |
| #define PBL_AW86225_DEFINE | ( | sym, | |
| _bus, | |||
| _addr, | |||
| _reset | |||
| ) |
Define an AW86225.
| sym | Symbol of the instance; the motor is sym.vibe. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |
| _reset | Reset line (struct pbl_gpio). |