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

Go to the source code of this file.

Data Structures

struct  drv2605_rom_data
 
struct  drv2605_rtp_data
 
union  drv2605_config_data
 

Macros

#define DRV2605_WAVEFORM_SEQUENCER_MAX   8
 

Enumerations

enum  drv2605_library {
  DRV2605_LIBRARY_EMPTY = 0 , DRV2605_LIBRARY_TS2200_A , DRV2605_LIBRARY_TS2200_B , DRV2605_LIBRARY_TS2200_C ,
  DRV2605_LIBRARY_TS2200_D , DRV2605_LIBRARY_TS2200_E , DRV2605_LIBRARY_LRA
}
 
enum  drv2605_mode {
  DRV2605_MODE_INTERNAL_TRIGGER = 0 , DRV2605_MODE_EXTERNAL_EDGE_TRIGGER , DRV2605_MODE_EXTERNAL_LEVEL_TRIGGER , DRV2605_MODE_PWM_ANALOG_INPUT ,
  DRV2605_MODE_AUDIO_TO_VIBE , DRV2605_MODE_RTP , DRV2605_MODE_DIAGNOSTICS , DRV2605_MODE_AUTO_CAL
}
 
enum  drv2605_haptics_source {
  DRV2605_HAPTICS_SOURCE_ROM , DRV2605_HAPTICS_SOURCE_RTP , DRV2605_HAPTICS_SOURCE_AUDIO , DRV2605_HAPTICS_SOURCE_PWM ,
  DRV2605_HAPTICS_SOURCE_ANALOG
}
 DRV2605 haptic driver signal sources. More...
 

Functions

int drv2605_haptic_config (const struct device *dev, enum drv2605_haptics_source source, const union drv2605_config_data *config_data)
 Configure the DRV2605 device for a particular signal source.
 

Macro Definition Documentation

◆ DRV2605_WAVEFORM_SEQUENCER_MAX

#define DRV2605_WAVEFORM_SEQUENCER_MAX   8

Enumeration Type Documentation

◆ drv2605_haptics_source

DRV2605 haptic driver signal sources.

Enumerator
DRV2605_HAPTICS_SOURCE_ROM 

The playback source is device ROM.

DRV2605_HAPTICS_SOURCE_RTP 

The playback source is the RTP buffer.

DRV2605_HAPTICS_SOURCE_AUDIO 

The playback source is audio.

DRV2605_HAPTICS_SOURCE_PWM 

The playback source is a PWM signal.

DRV2605_HAPTICS_SOURCE_ANALOG 

The playback source is an analog signal.

◆ drv2605_library

Enumerator
DRV2605_LIBRARY_EMPTY 
DRV2605_LIBRARY_TS2200_A 
DRV2605_LIBRARY_TS2200_B 
DRV2605_LIBRARY_TS2200_C 
DRV2605_LIBRARY_TS2200_D 
DRV2605_LIBRARY_TS2200_E 
DRV2605_LIBRARY_LRA 

◆ drv2605_mode

Enumerator
DRV2605_MODE_INTERNAL_TRIGGER 
DRV2605_MODE_EXTERNAL_EDGE_TRIGGER 
DRV2605_MODE_EXTERNAL_LEVEL_TRIGGER 
DRV2605_MODE_PWM_ANALOG_INPUT 
DRV2605_MODE_AUDIO_TO_VIBE 
DRV2605_MODE_RTP 
DRV2605_MODE_DIAGNOSTICS 
DRV2605_MODE_AUTO_CAL 

Function Documentation

◆ drv2605_haptic_config()

int drv2605_haptic_config ( const struct device * dev,
enum drv2605_haptics_source source,
const union drv2605_config_data * config_data )

Configure the DRV2605 device for a particular signal source.

Parameters
devPointer to the device structure for haptic device instance
sourceThe type of haptic signal source desired
config_dataPointer to the configuration data union for the source
Return values
0if successful
-ENOTSUPif the signal source is not supported
<0if failed