|
| int | pbl_accel_dev_init (const struct pbl_device *dev) |
| | Device init of every accelerometer: calls the driver's init with the lock held.
|
| |
| void | pbl_accel_lock (const struct pbl_accel *accel) |
| | Take the device lock.
|
| |
| void | pbl_accel_unlock (const struct pbl_accel *accel) |
| | Release the device lock.
|
| |
| int | pbl_accel_set_listener (const struct pbl_accel *accel, const struct pbl_accel_listener *listener) |
| | Set the listener of samples and events.
|
| |
| int | pbl_accel_set_rotated (const struct pbl_accel *accel, bool rotated) |
| | Set whether the axes are rotated by 180 degrees.
|
| |
| int | pbl_accel_set_sampling_interval (const struct pbl_accel *accel, uint32_t interval_us, uint32_t *actual_us) |
| | Set the sampling interval.
|
| |
| uint32_t | pbl_accel_get_sampling_interval (const struct pbl_accel *accel) |
| | Get the sampling interval.
|
| |
| int | pbl_accel_set_num_samples (const struct pbl_accel *accel, uint32_t num_samples) |
| | Set the maximum number of samples the driver may batch.
|
| |
| uint32_t | pbl_accel_get_max_num_samples (const struct pbl_accel *accel) |
| | Get the maximum number of samples the driver can batch.
|
| |
| int | pbl_accel_peek (const struct pbl_accel *accel, struct pbl_accel_sample *sample) |
| | Read the most recent sample.
|
| |
| int | pbl_accel_set_shake_detection (const struct pbl_accel *accel, bool on) |
| | Enable or disable shake detection.
|
| |
| bool | pbl_accel_get_shake_detection (const struct pbl_accel *accel) |
| | Check whether shake detection is enabled.
|
| |
| int | pbl_accel_set_double_tap_detection (const struct pbl_accel *accel, bool on) |
| | Enable or disable double tap detection.
|
| |
| bool | pbl_accel_get_double_tap_detection (const struct pbl_accel *accel) |
| | Check whether double tap detection is enabled.
|
| |
| int | pbl_accel_set_shake_sensitivity_high (const struct pbl_accel *accel, bool high) |
| | Select high or normal shake sensitivity.
|
| |
| int | pbl_accel_set_shake_sensitivity_percent (const struct pbl_accel *accel, uint8_t percent) |
| | Set the normal shake sensitivity.
|
| |
| void | pbl_accel_report_samples (const struct pbl_accel *accel, const AccelRawBatch *batch) |
| | Report a batch of samples to the listener.
|
| |
| void | pbl_accel_report_sample (const struct pbl_accel *accel, const struct pbl_accel_sample *sample) |
| | Report a single sample to the listener, as a one-sample batch.
|
| |
| void | pbl_accel_report_event (const struct pbl_accel *accel, const struct pbl_accel_event *event) |
| | Report an event to the listener.
|
| |