|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
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. | |
CS40L26 Haptic Driver for LRA and VCM.
| enum cs40l26_source |
#include <cs40l26.h>
Wavetable sources for effects.
| Enumerator | |
|---|---|
| CS40L26_SOURCE_BUZ | Playback from the buzz library. |
| 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.
| [in] | dev | Pointer to the device structure for haptic device instance |
| [in] | frequency | Frequency of haptic effect in Hz (default: 0xA5) |
| [in] | level | Amplitude of haptic effect, where UINT8_MAX is 100% (default: 0x40) |
| [in] | duration | Playback duration in units of 4 milliseconds |
| 0 | if success |
| <0 | if failed |