Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

CS40L5x data structure for a device instance. More...

#include <zephyr/drivers/haptics/cs40l5x.h>

Data Fields

const struct device *const dev
 < Pointer to CS40L5x device instance
const struct cs40l5x_config *const config
 Lock to deconflict haptic playback, device calibration, and configuration changes.
struct k_mutex lock
 Device ID corresponding to the part number.
uint32_t dev_id
 Revision ID corresponding to the silicon variant.
uint8_t rev_id
 Callback handler for interrupt processing.
struct gpio_callback interrupt_callback
 Worker for debounced interrupt processing.
struct k_work_delayable interrupt_worker
 Callback handler for trigger logging.
struct gpio_callback trigger_callback
 Application-provided callback to recover from fatal hardware errors.
void(* error_callback )(const struct device *const haptic_dev, const uint32_t errors)
 Semaphore used to sequence the calibration routine.
struct k_sem calibration_semaphore
 F0 and ReDC data derived from calibration.
struct cs40l5x_calibration calibration
 Playback command for mailbox-triggered haptic effects.
uint32_t output
 Ring buffer to cache mailbox playback history.
struct ring_buf rb_mailbox_history
 Ring buffer to cache trigger playback history.
struct ring_buf rb_trigger_history
 Ring buffer storage for cached mailbox playback history.
uint8_t buf_mailbox_history [CONFIG_HAPTICS_CS40L5X_METADATA_CACHE_LEN]
 Ring buffer storage for cached trigger playback history.
uint8_t buf_trigger_history [CONFIG_HAPTICS_CS40L5X_METADATA_CACHE_LEN]
 Upload status for custom effects at indices 0 and 1.
bool custom_effects [CS40L5X_NUM_CUSTOM_EFFECTS]
 Number of haptic effects playing or suspended.
int effects_in_flight

Detailed Description

CS40L5x data structure for a device instance.

Field Documentation

◆ buf_mailbox_history

uint8_t cs40l5x_data::buf_mailbox_history[CONFIG_HAPTICS_CS40L5X_METADATA_CACHE_LEN]

Ring buffer storage for cached trigger playback history.

◆ buf_trigger_history

uint8_t cs40l5x_data::buf_trigger_history[CONFIG_HAPTICS_CS40L5X_METADATA_CACHE_LEN]

Upload status for custom effects at indices 0 and 1.

◆ calibration

struct cs40l5x_calibration cs40l5x_data::calibration

Playback command for mailbox-triggered haptic effects.

◆ calibration_semaphore

struct k_sem cs40l5x_data::calibration_semaphore

F0 and ReDC data derived from calibration.

◆ config

const struct cs40l5x_config* const cs40l5x_data::config

Lock to deconflict haptic playback, device calibration, and configuration changes.

◆ custom_effects

bool cs40l5x_data::custom_effects[CS40L5X_NUM_CUSTOM_EFFECTS]

Number of haptic effects playing or suspended.

◆ dev

const struct device* const cs40l5x_data::dev

< Pointer to CS40L5x device instance

Pointer to configuration structure for CS40L5x device instance

◆ dev_id

uint32_t cs40l5x_data::dev_id

Revision ID corresponding to the silicon variant.

◆ effects_in_flight

int cs40l5x_data::effects_in_flight

◆ error_callback

void(* cs40l5x_data::error_callback) (const struct device *const haptic_dev, const uint32_t errors)

Semaphore used to sequence the calibration routine.

◆ interrupt_callback

struct gpio_callback cs40l5x_data::interrupt_callback

Worker for debounced interrupt processing.

◆ interrupt_worker

struct k_work_delayable cs40l5x_data::interrupt_worker

Callback handler for trigger logging.

◆ lock

struct k_mutex cs40l5x_data::lock

Device ID corresponding to the part number.

◆ output

uint32_t cs40l5x_data::output

Ring buffer to cache mailbox playback history.

◆ rb_mailbox_history

struct ring_buf cs40l5x_data::rb_mailbox_history

Ring buffer to cache trigger playback history.

◆ rb_trigger_history

struct ring_buf cs40l5x_data::rb_trigger_history

Ring buffer storage for cached mailbox playback history.

◆ rev_id

uint8_t cs40l5x_data::rev_id

Callback handler for interrupt processing.

◆ trigger_callback

struct gpio_callback cs40l5x_data::trigger_callback

Application-provided callback to recover from fatal hardware errors.


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