|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | haptics_driver_api |
| Driver Operations Haptics driver operations More... | |
Typedefs | |
| typedef int(* | haptics_calibrate_t) (const struct device *dev, const uint32_t routine) |
| Calibrate the haptic driver for an external actuator. | |
| typedef int(* | haptics_monitor_get_t) (const struct device *dev, const enum haptics_monitor monitor, const enum haptics_monitor_type type, struct sensor_value *const val) |
| Retrieve an integrated sensor reading from the haptic driver. | |
| typedef int(* | haptics_monitor_set_t) (const struct device *dev, const enum haptics_monitor monitor, const bool enable) |
| Enable or disable integrated sensing for the haptic driver. | |
| typedef int(* | haptics_register_error_callback_t) (const struct device *dev, haptics_error_callback_t cb, void *const user_data) |
| Register a callback function for haptics errors. | |
| typedef int(* | haptics_select_source_t) (const struct device *dev, const enum haptics_source src, const union haptics_config *const cfg) |
| Specify a playback source for haptics_start_output(). | |
| typedef int(* | haptics_set_level_t) (const struct device *dev, const enum haptics_source src, const union haptics_config *const cfg, const uint32_t level) |
| Set level controls for haptic effects. | |
| typedef int(* | haptics_start_output_t) (const struct device *dev) |
| Start playback for a haptic effect. | |
| typedef int(* | haptics_stop_output_t) (const struct device *dev) |
| Stop an ongoing haptic effect and cancel any queued effects, if applicable. | |
| typedef int(* | haptics_stream_samples_t) (const struct device *dev, const uint8_t *const samples, const size_t len) |
| Stream 8-bit samples over the control port for haptic effects. | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a Haptics driver.
#include <zephyr/drivers/haptics.h>
Calibrate the haptic driver for an external actuator.
See haptics_calibrate() for argument description.
| typedef int(* haptics_monitor_get_t) (const struct device *dev, const enum haptics_monitor monitor, const enum haptics_monitor_type type, struct sensor_value *const val) |
#include <zephyr/drivers/haptics.h>
Retrieve an integrated sensor reading from the haptic driver.
See haptics_monitor_get() for argument description.
| typedef int(* haptics_monitor_set_t) (const struct device *dev, const enum haptics_monitor monitor, const bool enable) |
#include <zephyr/drivers/haptics.h>
Enable or disable integrated sensing for the haptic driver.
See haptics_monitor_set() for argument description.
| typedef int(* haptics_register_error_callback_t) (const struct device *dev, haptics_error_callback_t cb, void *const user_data) |
#include <zephyr/drivers/haptics.h>
Register a callback function for haptics errors.
See haptics_register_error_callback() for argument description.
| typedef int(* haptics_select_source_t) (const struct device *dev, const enum haptics_source src, const union haptics_config *const cfg) |
#include <zephyr/drivers/haptics.h>
Specify a playback source for haptics_start_output().
See haptics_select_source() for argument description.
| typedef int(* haptics_set_level_t) (const struct device *dev, const enum haptics_source src, const union haptics_config *const cfg, const uint32_t level) |
#include <zephyr/drivers/haptics.h>
Set level controls for haptic effects.
See haptics_set_level() for argument description.
| typedef int(* haptics_start_output_t) (const struct device *dev) |
#include <zephyr/drivers/haptics.h>
Start playback for a haptic effect.
See haptics_start_output() for argument description.
| typedef int(* haptics_stop_output_t) (const struct device *dev) |
#include <zephyr/drivers/haptics.h>
Stop an ongoing haptic effect and cancel any queued effects, if applicable.
See haptics_stop_output() for argument description.
| typedef int(* haptics_stream_samples_t) (const struct device *dev, const uint8_t *const samples, const size_t len) |
#include <zephyr/drivers/haptics.h>
Stream 8-bit samples over the control port for haptic effects.
See haptics_stream_samples() for argument description.