diff options
Diffstat (limited to 'drivers/haptic/DRV2605L.c')
-rw-r--r-- | drivers/haptic/DRV2605L.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index f74c96525..728554b01 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -114,6 +114,17 @@ void DRV_init(void) { DRV_write(DRV_GO, 0x01); } +void DRV_rtp_init(void) { + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_RTP_INPUT, 20); //20 is the lowest value I've found where haptics can still be felt. + DRV_write(DRV_MODE, 0x05); + DRV_write(DRV_GO, 0x01); +} + +void DRV_amplitude(uint8_t amplitude) { + DRV_write(DRV_RTP_INPUT, amplitude); +} + void DRV_pulse(uint8_t sequence) { DRV_write(DRV_GO, 0x00); DRV_write(DRV_WAVEFORM_SEQ_1, sequence); |