diff options
author | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-09-19 09:42:33 -0700 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-11-04 16:48:39 +0900 |
commit | 42f70cd4235aed50f84163aeb6ac09a4aad49d64 (patch) | |
tree | b15452d06164ab8ec42478515fffb82b05ee3bda /drivers/haptic/haptic.h | |
parent | 66d3ac0b72dcaf4d0dcdd0edc4bd6aab2b16c749 (diff) |
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
Diffstat (limited to 'drivers/haptic/haptic.h')
-rw-r--r-- | drivers/haptic/haptic.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h index 8135d0d439..2f6eb31fc2 100644 --- a/drivers/haptic/haptic.h +++ b/drivers/haptic/haptic.h @@ -34,12 +34,14 @@ typedef union { uint32_t raw; struct { - bool enable : 1; - uint8_t feedback : 2; - uint8_t mode : 7; - bool buzz : 1; - uint8_t dwell : 7; - uint16_t reserved : 16; + bool enable :1; + uint8_t feedback :2; + uint8_t mode :7; + bool buzz :1; + uint8_t dwell :7; + bool cont :1; + uint8_t amplitude :8; + uint16_t reserved :7; }; } haptic_config_t; @@ -71,6 +73,9 @@ uint8_t haptic_get_mode(void); uint8_t haptic_get_feedback(void); void haptic_dwell_increase(void); void haptic_dwell_decrease(void); +void haptic_toggle_continuous(void); +void haptic_cont_increase(void); +void haptic_cont_decrease(void); void haptic_play(void); void haptic_shutdown(void); |