Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
haptics_driver_api Struct Reference

Driver Operations Haptics driver operations More...

#include <zephyr/drivers/haptics.h>

Data Fields

haptics_calibrate_t calibrate
  OPT Calibrate the haptic driver for an external actuator.
haptics_monitor_get_t monitor_get
  OPT Retrieve an integrated sensor reading from the haptic driver.
haptics_monitor_set_t monitor_set
  OPT Enable or disable integrated sensing for the haptic driver.
haptics_register_error_callback_t register_error_callback
  OPT Register a callback function for haptics errors.
haptics_select_source_t select_source
  REQ Specify a playback source and related configuration details.
haptics_set_level_t set_level
  OPT Set level controls for haptic effects.
haptics_start_output_t start_output
  REQ Start playback for a haptic effect.
haptics_stop_output_t stop_output
  REQ Stop an ongoing haptic effect and cancel any queued effects, if applicable.
haptics_stream_samples_t stream_samples
  OPT Stream 8-bit samples over the control port for haptic effects.

Detailed Description

Driver Operations Haptics driver operations

This is the driver API structure any Haptics driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ calibrate

haptics_calibrate_t haptics_driver_api::calibrate

OPT Calibrate the haptic driver for an external actuator.

◆ monitor_get

haptics_monitor_get_t haptics_driver_api::monitor_get

OPT Retrieve an integrated sensor reading from the haptic driver.

◆ monitor_set

haptics_monitor_set_t haptics_driver_api::monitor_set

OPT Enable or disable integrated sensing for the haptic driver.

◆ register_error_callback

haptics_register_error_callback_t haptics_driver_api::register_error_callback

OPT Register a callback function for haptics errors.

◆ select_source

haptics_select_source_t haptics_driver_api::select_source

REQ Specify a playback source and related configuration details.

◆ set_level

haptics_set_level_t haptics_driver_api::set_level

OPT Set level controls for haptic effects.

◆ start_output

haptics_start_output_t haptics_driver_api::start_output

REQ Start playback for a haptic effect.

◆ stop_output

haptics_stop_output_t haptics_driver_api::stop_output

REQ Stop an ongoing haptic effect and cancel any queued effects, if applicable.

◆ stream_samples

haptics_stream_samples_t haptics_driver_api::stream_samples

OPT Stream 8-bit samples over the control port for haptic effects.


The documentation for this struct was generated from the following file: