CS40L5x Haptic Driver

Browse source code on GitHub

Overview

CS40L5x is a family (CS40L50/51/52/53) of haptics drivers designed for trackpads, tablets, and automotive applications.

This sample demonstrates ROM features available on CS40L5x haptics drivers, including ROM effects, custom PCM/PWLE effects, edge-triggered haptic effects, buzz effects, and runtime haptics logging. A custom shell interface is provided that exposes a subset of the CS40L5x API; basic demonstrations of other API calls are provided in main().

Building and Running

Build the application for the Nucleo F401RE board, connect a CS40L5x haptic driver on the bus I2C1 at the address 0x34, and use one of the following compatibles based on the variant: cirrus,cs40l50, cirrus,cs40l51, cirrus,cs40l52, or cirrus,cs40l53. Connect three host GPIO pins to CS40L5x pins 11, 12, and 13 for edge-triggered effects.

west build -b nucleo_f401re samples/drivers/haptics/cs40l5x

Alternatively, build the application for the CRD40L50-POC-Q demonstration board.

west build -b crd40l50 samples/drivers/haptics/cs40l5x

For flashing the application, refer to the Flashing sections of the Nucleo F401RE or CRD40L50-POC-Q board documentation.

See also

Haptics