Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
haptics.h File Reference

Main header file for haptics driver API. More...

#include <zephyr/device.h>
#include <syscalls/haptics.h>

Go to the source code of this file.

Data Structures

struct  haptics_driver_api
 Haptic device API. More...

Typedefs

typedef int(* haptics_stop_output_t) (const struct device *dev)
 Set the haptic device to stop output.
typedef int(* haptics_start_output_t) (const struct device *dev)
 Set the haptic device to start output for a playback event.
typedef void(* haptics_error_callback_t) (const struct device *dev, const uint32_t errors, void *const user_data)
 Callback function for error interrupt.
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.

Enumerations

enum  haptics_error_type {
  HAPTICS_ERROR_OVERCURRENT = BIT(0) , HAPTICS_ERROR_OVERTEMPERATURE = BIT(1) , HAPTICS_ERROR_UNDERVOLTAGE = BIT(2) , HAPTICS_ERROR_OVERVOLTAGE = BIT(3) ,
  HAPTICS_ERROR_DC = BIT(4) , HAPTICS_ERROR_PRIV_START = BIT(5)
}
 Haptics error types. More...

Functions

int haptics_start_output (const struct device *dev)
 Set the haptic device to start output for a playback event.
int haptics_stop_output (const struct device *dev)
 Set the haptic device to stop output for a playback event.
static int haptics_register_error_callback (const struct device *dev, haptics_error_callback_t cb, void *const user_data)
 Register a callback function for haptics errors.

Detailed Description

Main header file for haptics driver API.