I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
DRV2605L_ex.h File Reference
#include "sarmfsw.h"
#include "DRV2605L.h"
Include dependency graph for DRV2605L_ex.h:
This graph shows which files directly or indirectly include this file:

Data Structures

union  uDRV_REG_MAP
 DRV2605L Register map union. More...
 

Functions

FctERR DRV2605L_Vibe (const DRV2605L_go go)
 Start/Stop haptic pattern.
 
FctERR DRV2605L_Reset (void)
 Reset DRV260x chip.
 
FctERR DRV2605L_Set_ActType (const DRV2605L_act act)
 Set haptic actuator type.
 
FctERR DRV2605L_Set_ERM (void)
 Set haptic actuator type to ERM.
 
FctERR DRV2605L_Set_LRA (void)
 Set haptic device actuator type to LRA.
 
FctERR DRV2605L_Set_OperatingMode (const DRV2605L_mode mode)
 Set haptic operating mode.
 
FctERR DRV2605L_Set_Standby (const bool stdby)
 Set haptic device to standby.
 
FctERR DRV2605L_Set_InputMode (const DRV2605L_input input)
 Set haptic device input pin type.
 
FctERR DRV2605L_Set_LoopMode (const DRV2605L_loop loop)
 Set haptic device input pin type.
 
FctERR DRV2605L_Set_Library (const DRV2605L_lib lib)
 Set haptic device library.
 
FctERR DRV2605L_Set_Waveform (const uint16_t chan, const DRV2605L_eff effect, const bool wait)
 Set haptic device channel in the waveform sequencer.
 
FctERR DRV2605L_Set_OverdriveTimeOffset (const uint8_t val)
 Set Overdrive time offset.
 
FctERR DRV2605L_Set_SustainTimeOffset (const uint8_t val, const bool pos)
 Set Sustain time offset.
 
FctERR DRV2605L_Set_BrakeTimeOffset (const uint8_t val)
 Set Brake time offset.
 
FctERR DRV2605L_Set_RTP (const uint8_t val)
 Set RTP input level.
 
FctERR DRV2605L_Set_RTPDataFormat (const DRV2605L_rtp_format format)
 Set RTP format.
 
FctERR DRV2605L_Set_ATVPeakTime (const DRV2605L_peak peak)
 Set Audio To Vibe Peak time.
 
FctERR DRV2605L_Set_ATVLowPassFilter (const DRV2605L_filter filt)
 Set Audio To Vibe Low pass filter.
 
FctERR DRV2605L_Set_ATVInputLevel_Raw (const uint8_t val, const bool maxi)
 Set Audio To Vibe min/max input level.
 
FctERR DRV2605L_Set_ATVOutputDrive_Raw (const uint8_t val, const bool maxi)
 Set Audio To Vibe min/max output drive.
 
FctERR DRV2605L_Set_ATVInput_Volt (const float volt, const bool maxi)
 Set Audio To Vibe min/max input voltage.
 
FctERR DRV2605L_Set_ATVDrive_Percent (const uint16_t perc, const bool maxi)
 Set Audio To Vibe min/max Drive.
 
FctERR DRV2605L_Set_RatedVoltage (const uint8_t val)
 Set haptic Rated voltage.
 
FctERR DRV2605L_Set_ODClamp (const uint8_t val)
 Set haptic Overdrive Clamp.
 
FctERR DRV2605L_Set_BlankingTime (const uint16_t time)
 Set haptic Blanking time.
 
FctERR DRV2605L_Set_CurrentDissipationTime (const uint16_t time)
 Set haptic Current dissipation time.
 
FctERR DRV2605L_Set_LRAOpenLoopPeriod_Raw (const uint8_t val)
 Set haptic LRA Open loop period.
 
FctERR DRV2605L_Set_LRAOpenLoopPeriod_us (const uint16_t per)
 Set haptic LRA Open loop period.
 
FctERR DRV2605L_Get_ATVInput_Volt (float *const volt, const bool maxi)
 Get min/max Audio To Vibe Input voltage.
 
FctERR DRV2605L_Get_ATVDrive_Percent (float *const perc, const bool maxi)
 Get min/max Audio To Vibe Drive.
 
FctERR DRV2605L_Get_BlankingTime (uint16_t *const time)
 Get haptic Blanking time.
 
FctERR DRV2605L_Get_CurrentDissipationTime (uint16_t *const time)
 Get haptic Current dissipation time.
 
FctERR DRV2605L_Get_Voltage (uint16_t *const vbat)
 Get haptic Voltage.
 
FctERR DRV2605L_Get_LRAOpenLoopPeriod (uint16_t *const per)
 Get haptic LRA Open loop period.
 
FctERR DRV2605L_Get_ResonancePeriod (uint16_t *const per)
 Get haptic LRA Resonance period.
 
FctERR DRV2605L_Get_ChipID (uint8_t *const id)
 Get DRV260x chip ID.
 
void DRV2605L_EN_GPIO_Init (GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Enable GPIO pin init for DRV2605L.
 
void DRV2605L_EN_GPIO_Set (const bool state)
 Enable GPIO pin setter for DRV2605L.
 
void DRV2605L_TRIG_GPIO_Init (GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Trigger GPIO pin init for DRV2605L.
 
void DRV2605L_TRIG_GPIO_Set (const bool state)
 Trigger GPIO pin setter for DRV2605L.
 

Function Documentation

◆ DRV2605L_EN_GPIO_Init()

void DRV2605L_EN_GPIO_Init ( GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Enable GPIO pin init for DRV2605L.

Weak Functions
DRV2605L Enable GPIO pin init may be user implemented if needed
Parameters
[in]GPIOx- EN port
[in]GPIO_Pin- EN pin
[in]GPIO_ActiveEN pin active state
Here is the call graph for this function:

◆ DRV2605L_EN_GPIO_Set()

void DRV2605L_EN_GPIO_Set ( const bool state)

Enable GPIO pin setter for DRV2605L.

Weak Functions
DRV2605L Enable GPIO pin setter may be user implemented if needed
Parameters
[in]state- state to write on EN pin (0: inactive, 1: active)
Here is the call graph for this function:

◆ DRV2605L_Get_ATVDrive_Percent()

FctERR DRV2605L_Get_ATVDrive_Percent ( float *const perc,
const bool maxi )

Get min/max Audio To Vibe Drive.

Parameters
[in,out]perc- pointer to Audio To Vibe Drive result
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Get_ATVInput_Volt()

FctERR DRV2605L_Get_ATVInput_Volt ( float *const volt,
const bool maxi )

Get min/max Audio To Vibe Input voltage.

Parameters
[in,out]volt- pointer to Audio To Vibe Input voltage result
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Get_BlankingTime()

FctERR DRV2605L_Get_BlankingTime ( uint16_t *const time)

Get haptic Blanking time.

Parameters
[in,out]time- pointer to Blanking time value result
Returns
FctERR - error code

◆ DRV2605L_Get_ChipID()

FctERR DRV2605L_Get_ChipID ( uint8_t *const id)

Get DRV260x chip ID.

Parameters
[in,out]id- pointer to chip ID result
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Get_CurrentDissipationTime()

FctERR DRV2605L_Get_CurrentDissipationTime ( uint16_t *const time)

Get haptic Current dissipation time.

Parameters
[in,out]time- pointer to Blanking time value result
Returns
FctERR - error code

◆ DRV2605L_Get_LRAOpenLoopPeriod()

FctERR DRV2605L_Get_LRAOpenLoopPeriod ( uint16_t *const per)

Get haptic LRA Open loop period.

Parameters
[in,out]per- pointer to LRA open loop period result
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Get_ResonancePeriod()

FctERR DRV2605L_Get_ResonancePeriod ( uint16_t *const per)

Get haptic LRA Resonance period.

Parameters
[in,out]per- pointer to LRA Resonance period result
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Get_Voltage()

FctERR DRV2605L_Get_Voltage ( uint16_t *const vbat)

Get haptic Voltage.

Parameters
[in,out]vbat- pointer to Battery voltage result
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Reset()

FctERR DRV2605L_Reset ( void )
inline

Reset DRV260x chip.

Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_ActType()

FctERR DRV2605L_Set_ActType ( const DRV2605L_act act)

Set haptic actuator type.

Parameters
[in]act- 0 ERM, 1 LRA
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_ATVDrive_Percent()

FctERR DRV2605L_Set_ATVDrive_Percent ( const uint16_t perc,
const bool maxi )

Set Audio To Vibe min/max Drive.

Parameters
[in]perc- Audio To Vibe drive value (in percent)
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_ATVInput_Volt()

FctERR DRV2605L_Set_ATVInput_Volt ( const float volt,
const bool maxi )

Set Audio To Vibe min/max input voltage.

Parameters
[in]volt- Audio To Vibe Input voltage value
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_ATVInputLevel_Raw()

FctERR DRV2605L_Set_ATVInputLevel_Raw ( const uint8_t val,
const bool maxi )
inline

Set Audio To Vibe min/max input level.

Parameters
[in]val- Audio To Vibe Input level value
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_ATVLowPassFilter()

FctERR DRV2605L_Set_ATVLowPassFilter ( const DRV2605L_filter filt)

Set Audio To Vibe Low pass filter.

Parameters
[in]filt- Audio To Vibe Low pass filter value
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_ATVOutputDrive_Raw()

FctERR DRV2605L_Set_ATVOutputDrive_Raw ( const uint8_t val,
const bool maxi )
inline

Set Audio To Vibe min/max output drive.

Parameters
[in]val- Audio To Vibe Output drive value
[in]maxi- 0 Min, 1 Max
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_ATVPeakTime()

FctERR DRV2605L_Set_ATVPeakTime ( const DRV2605L_peak peak)

Set Audio To Vibe Peak time.

Parameters
[in]peak- Audio To Vibe Peak time value
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_BlankingTime()

FctERR DRV2605L_Set_BlankingTime ( const uint16_t time)

Set haptic Blanking time.

Parameters
[in]time- Blanking time value
Returns
FctERR - error code

◆ DRV2605L_Set_BrakeTimeOffset()

FctERR DRV2605L_Set_BrakeTimeOffset ( const uint8_t val)
inline

Set Brake time offset.

Parameters
[in]val- Brake time offset value
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_CurrentDissipationTime()

FctERR DRV2605L_Set_CurrentDissipationTime ( const uint16_t time)

Set haptic Current dissipation time.

Parameters
[in]time- Current dissipation time value
Returns
FctERR - error code

◆ DRV2605L_Set_ERM()

FctERR DRV2605L_Set_ERM ( void )
inline

Set haptic actuator type to ERM.

Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_InputMode()

FctERR DRV2605L_Set_InputMode ( const DRV2605L_input input)

Set haptic device input pin type.

Parameters
[in]input- 0: PWM, 1: Analog
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_Library()

FctERR DRV2605L_Set_Library ( const DRV2605L_lib lib)

Set haptic device library.

Parameters
[in]lib- Internal library used
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_LoopMode()

FctERR DRV2605L_Set_LoopMode ( const DRV2605L_loop loop)

Set haptic device input pin type.

Parameters
[in]loop- 0: ERM Closed Loop, LRA Auto Resonance, 1: Open Loop
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_LRA()

FctERR DRV2605L_Set_LRA ( void )
inline

Set haptic device actuator type to LRA.

Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_LRAOpenLoopPeriod_Raw()

FctERR DRV2605L_Set_LRAOpenLoopPeriod_Raw ( const uint8_t val)
inline

Set haptic LRA Open loop period.

Parameters
[in]val- LRA Open loop period raw
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_LRAOpenLoopPeriod_us()

FctERR DRV2605L_Set_LRAOpenLoopPeriod_us ( const uint16_t per)

Set haptic LRA Open loop period.

Parameters
[in]per- LRA Open loop period (in us)
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_ODClamp()

FctERR DRV2605L_Set_ODClamp ( const uint8_t val)
inline

Set haptic Overdrive Clamp.

Parameters
[in]val- Overdrive clamp value
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_OperatingMode()

FctERR DRV2605L_Set_OperatingMode ( const DRV2605L_mode mode)

Set haptic operating mode.

Parameters
[in]mode- haptic input operating mode
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_OverdriveTimeOffset()

FctERR DRV2605L_Set_OverdriveTimeOffset ( const uint8_t val)
inline

Set Overdrive time offset.

Parameters
[in]val- Overdrive time offset value
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_RatedVoltage()

FctERR DRV2605L_Set_RatedVoltage ( const uint8_t val)
inline

Set haptic Rated voltage.

Parameters
[in]val- Rated voltage value
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_RTP()

FctERR DRV2605L_Set_RTP ( const uint8_t val)
inline

Set RTP input level.

Parameters
[in]val- RTP input level value
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_RTPDataFormat()

FctERR DRV2605L_Set_RTPDataFormat ( const DRV2605L_rtp_format format)

Set RTP format.

Parameters
[in]format- 0: Signed, 1: Unsigned
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_Set_Standby()

FctERR DRV2605L_Set_Standby ( const bool stdby)

Set haptic device to standby.

Parameters
[in]stdby- 0: Normal operation, 1: standby
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_SustainTimeOffset()

FctERR DRV2605L_Set_SustainTimeOffset ( const uint8_t val,
const bool pos )
inline

Set Sustain time offset.

Parameters
[in]val- Sustain time offset value
[in]pos- 0 Negative, 1 Positive
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DRV2605L_Set_Waveform()

FctERR DRV2605L_Set_Waveform ( const uint16_t chan,
const DRV2605L_eff effect,
const bool wait )

Set haptic device channel in the waveform sequencer.

Parameters
[in]chan- Waveform sequencer channel
[in]effect- Effect number for haptic feedback
[in]wait- Wait between patterns
Returns
FctERR - error code
Here is the call graph for this function:

◆ DRV2605L_TRIG_GPIO_Init()

void DRV2605L_TRIG_GPIO_Init ( GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Trigger GPIO pin init for DRV2605L.

Weak Functions
DRV2605L Trigger GPIO pin init may be user implemented if needed
Parameters
[in]GPIOx- TRIG port
[in]GPIO_Pin- TRIG pin
[in]GPIO_ActiveTRIG pin active state
Here is the call graph for this function:

◆ DRV2605L_TRIG_GPIO_Set()

void DRV2605L_TRIG_GPIO_Set ( const bool state)

Trigger GPIO pin setter for DRV2605L.

Weak Functions
DRV2605L Trigger GPIO pin setter may be user implemented if needed
Parameters
[in]state- state to write on TRIG pin (0: inactive, 1: active)
Here is the call graph for this function:

◆ DRV2605L_Vibe()

FctERR DRV2605L_Vibe ( const DRV2605L_go go)
inline

Start/Stop haptic pattern.

Parameters
[in]go- 0 OFF, 1 ON
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: