Bergsonne Labs

Drive.H

LRA haptic driver for the Drive.H tile (rev a).

Tile Details

Embeds the TI DRV2605L, a haptic driver for LRA (Linear Resonant Actuator) and ERM actuators with a built-in waveform library of 123 effects.

Key specifications:
  - Output:       full-bridge, 3.0–5.2 Vrms into LRA
  - Waveform lib: 123 haptic effects (6 libraries)
  - Auto-cal:     automatic resonance tracking for LRA
  - Modes:        Internal trigger, RTP, PWM, audio-to-vibe
0x5A

Quick Start

Quick start

tiles_hal_core_cfg_t cfg = { .i2c = &hi2c1, .buses = TILES_BUS_I2C };
tiles_hal_t hal;
tiles_hal_core_init(&hal, &cfg);

tile_t haptic;
tile_drive_h_init(&hal, 0, &haptic);
if (tile_is_ready(&haptic)) {
    tile_drive_h_play(&haptic, 1, 1);  // play effect #1 once
}

Initialization

uint8_t tile_drive_h_find(tiles_hal_t* hal, uint8_t instance);

Check whether a DRV2605L is present on the I2C bus.

Parameters
hal
Platform HAL handle
instance
Instance index (0 = default, see mapping table)
Returns

1 if device ACKs, 0 otherwise

void tile_drive_h_init(tiles_hal_t* hal, uint8_t instance, tile_t* tile);

Initialize the DRV2605L haptic driver.

Verifies the status register, exits standby, and configures for LRA open-loop operation with library 6.

Parameters
hal
Platform HAL handle
instance
Instance index (0 = default, see mapping table)
tile
Pointer to tile handle (populated by this function)

Blocks for ~500 ms during init. Call once at startup.

Data

void tile_drive_h_rtp_write(tile_t* tile, uint8_t amplitude);

Write an amplitude value in RTP mode.

Parameters
tile
Pointer to tile handle
amplitude
Unsigned 8-bit amplitude (0 = off, 127 = max)

Control

void tile_drive_h_play(tile_t* tile, uint8_t index, uint8_t repeats);

Play a waveform effect from the built-in library.

Loads the effect index into sequence slot 0, terminates the sequence, and triggers playback. For repeats > 1, re-triggers with a 200ms gap between plays.

Parameters
tile
Pointer to tile handle
index
Library effect index (1–123, see datasheet)
repeats
Number of times to play (1 = once)
void tile_drive_h_stop(tile_t* tile);

Stop any currently playing effect.

Parameters
tile
Pointer to tile handle
void tile_drive_h_rtp_start(tile_t* tile);

Enter RTP (Real-Time Playback) mode.

Sets DRV2605L MODE register to 0x05 (RTP). The chip drives the LRA at its resonant frequency with amplitude controlled by tile_drive_h_rtp_write(). Call tile_drive_h_rtp_stop() to return to internal trigger mode.

Parameters
tile
Pointer to tile handle
void tile_drive_h_rtp_write(tile_t* tile, uint8_t amplitude);

Write an amplitude value in RTP mode.

Parameters
tile
Pointer to tile handle
amplitude
Unsigned 8-bit amplitude (0 = off, 127 = max)
void tile_drive_h_rtp_stop(tile_t* tile);

Exit RTP mode and return to internal trigger mode.

Parameters
tile
Pointer to tile handle

Auto-generated from tile_drive_h.h v2.0.0 — last synced 3/26/2026