12#ifndef ZEPHYR_INCLUDE_DRIVERS_HAPTICS_DRV2605_H_
13#define ZEPHYR_INCLUDE_DRIVERS_HAPTICS_DRV2605_H_
35#define DRV2605_WAVEFORM_SEQUENCER_MAX 8
47#define DRV2605_WAVEFORM_SEQUENCER_WAIT_MS(ms) (0x80 | ((ms) / 10))
drv2605_mode
Modes of operation.
Definition drv2605.h:75
#define DRV2605_WAVEFORM_SEQUENCER_MAX
Maximum number of waveforms that can be stored in the sequencer.
Definition drv2605.h:35
drv2605_library
Effect libraries.
Definition drv2605.h:58
drv2605_haptics_source
Types of haptic signal sources.
Definition drv2605.h:92
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.
@ DRV2605_MODE_DIAGNOSTICS
Diagnostics mode.
Definition drv2605.h:82
@ DRV2605_MODE_PWM_ANALOG_INPUT
PWM or Analog input mode.
Definition drv2605.h:79
@ DRV2605_MODE_EXTERNAL_LEVEL_TRIGGER
External trigger mode (level)
Definition drv2605.h:78
@ DRV2605_MODE_INTERNAL_TRIGGER
Internal trigger mode.
Definition drv2605.h:76
@ DRV2605_MODE_AUTO_CAL
Auto-calibration mode.
Definition drv2605.h:83
@ DRV2605_MODE_EXTERNAL_EDGE_TRIGGER
External trigger mode (edge)
Definition drv2605.h:77
@ DRV2605_MODE_RTP
RTP mode.
Definition drv2605.h:81
@ DRV2605_MODE_AUDIO_TO_VIBE
Audio-to-vibe mode.
Definition drv2605.h:80
@ DRV2605_LIBRARY_TS2200_B
TouchSense 2220 B library.
Definition drv2605.h:61
@ DRV2605_LIBRARY_TS2200_A
TouchSense 2220 A library.
Definition drv2605.h:60
@ DRV2605_LIBRARY_LRA
Linear Resonance Actuator (LRA) library.
Definition drv2605.h:65
@ DRV2605_LIBRARY_TS2200_C
TouchSense 2220 C library.
Definition drv2605.h:62
@ DRV2605_LIBRARY_TS2200_D
TouchSense 2220 D library.
Definition drv2605.h:63
@ DRV2605_LIBRARY_TS2200_E
TouchSense 2220 E library.
Definition drv2605.h:64
@ DRV2605_LIBRARY_EMPTY
Empty library.
Definition drv2605.h:59
@ DRV2605_HAPTICS_SOURCE_ROM
Playback from the pre-programmed ROM library.
Definition drv2605.h:93
@ DRV2605_HAPTICS_SOURCE_AUDIO
Playback is generated from an audio signal.
Definition drv2605.h:95
@ DRV2605_HAPTICS_SOURCE_RTP
Playback from Real-Time Playback (RTP) data stream.
Definition drv2605.h:94
@ DRV2605_HAPTICS_SOURCE_ANALOG
Playback is driven by an external analog signal.
Definition drv2605.h:97
@ DRV2605_HAPTICS_SOURCE_PWM
Playback is driven by an external PWM signal.
Definition drv2605.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
ROM data configuration.
Definition drv2605.h:106
uint8_t seq_regs[8]
Waveform sequencer contents.
Definition drv2605.h:122
uint8_t overdrive_time
Overdrive time offset.
Definition drv2605.h:131
enum drv2605_mode trigger
Mode of operation for triggering the ROM effects.
Definition drv2605.h:108
uint8_t sustain_neg_time
Sustain negative time offset.
Definition drv2605.h:149
uint8_t brake_time
Brake time offset.
Definition drv2605.h:158
enum drv2605_library library
Effect library to use for playback.
Definition drv2605.h:110
uint8_t sustain_pos_time
Sustain positive time offset.
Definition drv2605.h:140
Real-Time Playback (RTP) data configuration.
Definition drv2605.h:167
uint8_t * rtp_input
Pointer to an array of RTP amplitude values.
Definition drv2605.h:183
uint32_t * rtp_hold_us
Pointer to an array of hold times.
Definition drv2605.h:176
size_t size
The number of entries in the rtp_hold_us and rtp_input arrays.
Definition drv2605.h:169
Configuration data union.
Definition drv2605.h:193
struct drv2605_rom_data * rom_data
Pointer to ROM configuration data.
Definition drv2605.h:195
struct drv2605_rtp_data * rtp_data
Pointer to RTP configuration data.
Definition drv2605.h:197