Simulated vibration motor, reporting its strength to an observer.
More...
|
| #define | SIM_VIBE (&pbl_vibe_sim) |
| | The simulated vibration motor.
|
| |
Simulated vibration motor, reporting its strength to an observer.
◆ SIM_VIBE
| #define SIM_VIBE (&pbl_vibe_sim) |
The simulated vibration motor.
◆ pbl_vibe_sim_observer_t
| typedef void(* pbl_vibe_sim_observer_t) (const struct pbl_vibe *vibe, int8_t strength, void *arg) |
Strength change observer.
Called with the device lock held.
- Parameters
-
◆ pbl_vibe_sim_get_strength()
| int8_t pbl_vibe_sim_get_strength |
( |
const struct pbl_vibe * |
vibe | ) |
|
Get the motor strength.
- Parameters
-
- Returns
- Strength, 0 when stopped.
◆ pbl_vibe_sim_set_observer()
Set the observer called whenever the motor strength changes.
- Parameters
-
| vibe | Device. |
| observer | Observer, or NULL for none. |
| arg | Argument passed to observer. |