DRV2605L Continuous Haptic Feedback Support (#6461)
* provide means to turn on RTP mode and set the amplitude * new keycode HPT_CONT to turn RTP off/on * introduce new keycodes HPT_CONI, and HPT_COND for Haptic Continuous Increase and Decrease * support for continuous mode amplitude increase and decrease * code cleanup * update docs to reference new keycodes and functionality * don't touch the keymaps * add function prototypes * add proper guards * cleanup guards * remove extra reserved
This commit is contained in:
parent
7a5a2591eb
commit
911b8915cc
6 changed files with 101 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue