da728x
An async and no_std rust library for the wide-bandwidth haptic driver IC DA7280/DA7281/DA7282 from Renesas.
Supported ICs
- DA7280
- DA7281
- DA7282
What works
- CHIP_REV verification
- Configuration with validation
- Setting (resonant) frequency
- Enable / disable playback
- Reading and clearing system events and diagnostics
- Driving an LRA in frequency track, wideband or custom waveform mode
- DRO mode
What's missing
- Testing of PWM_MODE
- Uploading into the waveform memory and RTWM_MODE
- GPI configuration and ETWM_MODE
- Uploading a script (list of registers and values as exported by GUI)
Features
debug- Enable debug logging with thedefmtcrate
Usage
use ;
use ;
// Setup I2C
// let i2c = ...
// let address = ...
let mut haptics = new
.await
.unwrap;
// Values for the G1040003D LRA on the SparkFun board
let actuator_config = ActuatorConfig ;
// DRO Mode, which means we can set the amplitude via set_override_value()
let device_config = DeviceConfig ;
// Sets all registers as needed depending on the actuator type, operation mode and driving mode
haptics.configure.await.unwrap;
// Enables the Operation Mode (default is INACTIVE after configuration)
haptics.enable.await.unwrap;
loop