Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
DRV2605L Class Reference

Class for haptic driver. More...

#include <hV_Haptics_DRV2605L.h>

Public Member Functions

 DRV2605L (uint8_t mode=USE_DRV2605L_ERM)
 Constructor.
 
bool begin ()
 Diagnose and configure the DRV2605L.
 
void selectLibrary (uint8_t library)
 Select a library.
 
void playEffect (uint8_t effect)
 Play an effect.
 
uint8_t getMode ()
 Get active mode.
 
void setMode (uint8_t mode)
 Set active mode.
 
bool check ()
 Diagnose the DRV2605L.
 
bool autoConfigure ()
 Auto-configure the DRV2605L.
 

Detailed Description

Class for haptic driver.

I2C bus

Constructor & Destructor Documentation

◆ DRV2605L()

DRV2605L::DRV2605L ( uint8_t mode = USE_DRV2605L_ERM)

Constructor.

Parameters
modedefault = USE_DRV2605L_ERM
Note
Valid options are USE_HAPTICS_NONE, USE_DRV2605L_ERM and USE_DRV2605L_LRA

Member Function Documentation

◆ autoConfigure()

bool DRV2605L::autoConfigure ( )

Auto-configure the DRV2605L.

If auto-configure fails, mode is turned to USE_HAPTICS_NONE

Returns
true = available, false = error

◆ begin()

bool DRV2605L::begin ( )

Diagnose and configure the DRV2605L.

If diagnotic fails, mode is turned to USE_HAPTICS_NONE

Returns
true = available, false = error
Note
Wire needs to be initialised before calling DRV2605L.begin()
See also
https://e2e.ti.com/support/other_analog/haptics/f/927/p/688464/2548119#2548119

◆ check()

bool DRV2605L::check ( )

Diagnose the DRV2605L.

If diagnotic fails, mode is turned to USE_HAPTICS_NONE

Returns
true = available, false = error

◆ getMode()

uint8_t DRV2605L::getMode ( )

Get active mode.

Returns
USE_HAPTICS_NONE, USE_DRV2605L_ERM or USE_DRV2605L_LRA

◆ playEffect()

void DRV2605L::playEffect ( uint8_t effect)

Play an effect.

Parameters
effect0..123

◆ selectLibrary()

void DRV2605L::selectLibrary ( uint8_t library)

Select a library.

Parameters
library0..4 for ERM, 5 for LRA
Note
Valid options are
  • DRV2605L_ERM_LIBRARY_A...DRV2605L_ERM_LIBRARY_E for ERM
  • DRV2605L_LRA_LIBRARY for LRA

◆ setMode()

void DRV2605L::setMode ( uint8_t mode)

Set active mode.

Note
Valid modes are USE_HAPTICS_NONE, USE_DRV2605L_ERM and USE_DRV2605L_LRA

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