Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

CS40L26 Haptic Driver for LRA and VCM. More...

Files

file  cs40l26.h
 Header file providing the API for the CS40L26/27 haptic driver.

Enumerations

enum  cs40l26_source { CS40L26_SOURCE_BUZ = HAPTICS_SOURCE_PRIV_START }
 Wavetable sources for effects. More...

Functions

int cs40l26_configure_buzz (const struct device *const dev, const uint32_t frequency, const uint8_t level, const uint32_t duration)
 Configure ROM buzz for haptic playback.

Detailed Description

CS40L26 Haptic Driver for LRA and VCM.

Enumeration Type Documentation

◆ cs40l26_source

#include <cs40l26.h>

Wavetable sources for effects.

Enumerator
CS40L26_SOURCE_BUZ 

Playback from the buzz library.

Function Documentation

◆ cs40l26_configure_buzz()

int cs40l26_configure_buzz ( const struct device *const dev,
const uint32_t frequency,
const uint8_t level,
const uint32_t duration )

#include <cs40l26.h>

Configure ROM buzz for haptic playback.

With large amplitudes and insufficient power, it's possible to reach the current limit.

Parameters
[in]devPointer to the device structure for haptic device instance
[in]frequencyFrequency of haptic effect in Hz (default: 0xA5)
[in]levelAmplitude of haptic effect, where UINT8_MAX is 100% (default: 0x40)
[in]durationPlayback duration in units of 4 milliseconds
Return values
0if success
<0if failed