|
PebbleOS
|
Vibration motor driver operations, called with the device lock held. More...
#include <vibe.h>
Data Fields | |
| int(* | init )(const struct pbl_vibe *vibe) |
| Bring the hardware up. | |
| int(* | start )(const struct pbl_vibe *vibe, int8_t strength) |
Drive the motor at strength, starting it if stopped. | |
| int(* | stop )(const struct pbl_vibe *vibe) |
| Stop the motor. | |
| int(* | calibrate )(const struct pbl_vibe *vibe, uint8_t *cali) |
| Optional. | |
| int(* | set_calibration )(const struct pbl_vibe *vibe, uint8_t cali) |
| Optional. | |
Vibration motor driver operations, called with the device lock held.
| int(* pbl_vibe_ops::calibrate) (const struct pbl_vibe *vibe, uint8_t *cali) |
Optional.
Calibrate, setting cali to the value to persist.
| int(* pbl_vibe_ops::init) (const struct pbl_vibe *vibe) |
Bring the hardware up.
Returns 0, -ENODEV if the part does not answer, or a negative errno.
| int(* pbl_vibe_ops::set_calibration) (const struct pbl_vibe *vibe, uint8_t cali) |
Optional.
Apply a value set by calibrate.
| int(* pbl_vibe_ops::start) (const struct pbl_vibe *vibe, int8_t strength) |
Drive the motor at strength, starting it if stopped.
| int(* pbl_vibe_ops::stop) (const struct pbl_vibe *vibe) |
Stop the motor.