TI DRV2604 Vibration motor driver, driving an LRA in real-time playback mode.
More...
TI DRV2604 Vibration motor driver, driving an LRA in real-time playback mode.
1384, 3009);
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:126
Vibration motor.
Definition driver.h:44
#define PBL_VIBE_DRV2604_DEFINE(sym, _bus, _addr, _enable, _mode, _rated_mv, _overdrive_mv)
Define a DRV2604.
Definition drv2604.h:62
const struct pbl_vibe *const VIBE
The board's vibration motor.
#define DRV260X_LRA_MODE
Definition ti-drv260x.h:8
◆ pbl_vibe_drv2604
| Data Fields |
|
struct pbl_gpio |
enable |
Enable line. |
|
struct pbl_i2c_dev |
i2c |
I2C device. |
|
uint8_t |
mode |
Actuator mode, DRV260X_LRA_MODE or DRV260X_LRA_NO_CAL_MODE. |
|
uint8_t |
od_clamp |
Overdrive clamp register value. |
|
uint8_t |
rated_voltage |
Rated voltage register value. |
|
struct pbl_vibe |
vibe |
Vibration motor, child of the I2C bus. |
◆ PBL_VIBE_DRV2604_DEFINE
| #define PBL_VIBE_DRV2604_DEFINE |
( |
|
sym, |
|
|
|
_bus, |
|
|
|
_addr, |
|
|
|
_enable, |
|
|
|
_mode, |
|
|
|
_rated_mv, |
|
|
|
_overdrive_mv |
|
) |
| |
Value:
.i2c =
PBL_I2C_DEV(_bus, _addr), .enable = _enable, .mode = (_mode), \
.rated_voltage = DRV2604_VOLTAGE_REG(_rated_mv), \
.od_clamp = DRV2604_VOLTAGE_REG(_overdrive_mv), \
}
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:159
#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
DRV2604 haptic driver.
Definition drv2604.h:27
#define VIBE_STRENGTH_MIN
Full reverse, for drivers that can brake.
Definition vibe.h:29
Define a DRV2604.
- Parameters
-
| sym | Symbol of the instance, a struct pbl_vibe; the motor is sym.vibe. |
| _bus | I2C bus. |
| _addr | 7-bit I2C address. |
| _enable | Enable line (struct pbl_gpio). |
| _mode | Actuator mode, from dt-bindings/input/ti-drv260x.h. |
| _rated_mv | Rated voltage of the actuator, in millivolts. |
| _overdrive_mv | Overdrive voltage of the actuator, in millivolts. |