summaryrefslogtreecommitdiffstats
path: root/quantum/pointing_device_drivers.c
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2022-04-16 20:24:09 +0200
committerGitHub <noreply@github.com>2022-04-16 11:24:09 -0700
commit8f585153c470b07bb0c529ff49b39ef45f68d37e (patch)
tree5441986fa041cd2d966b800af3f82d69b55e4d58 /quantum/pointing_device_drivers.c
parentcad0af09a8a280d918b726eb472c86065dc5c079 (diff)
Add GET_TAPPING_TERM macro to reduce duplicate code (#16681)
* Add GET_TAPPING_TERM macro to reduce duplicate code The macro gives the right tapping term depending on whether per-key tapping terms and/or dynamic tapping terms are enabled. Unnecessary function calls and variable resolution are avoided. Fixes #16472. * Use GET_TAPPING_TERM for Cirque trackpads Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'quantum/pointing_device_drivers.c')
-rw-r--r--quantum/pointing_device_drivers.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/quantum/pointing_device_drivers.c b/quantum/pointing_device_drivers.c
index b8ef6e67e5..11cbf6594e 100644
--- a/quantum/pointing_device_drivers.c
+++ b/quantum/pointing_device_drivers.c
@@ -98,17 +98,9 @@ const pointing_device_driver_t pointing_device_driver = {
// clang-format on
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) || defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
# ifndef CIRQUE_PINNACLE_TAPPING_TERM
-# ifdef TAPPING_TERM_PER_KEY
-# include "action.h"
-# include "action_tapping.h"
-# define CIRQUE_PINNACLE_TAPPING_TERM get_tapping_term(KC_BTN1, &(keyrecord_t){})
-# else
-# ifdef TAPPING_TERM
-# define CIRQUE_PINNACLE_TAPPING_TERM TAPPING_TERM
-# else
-# define CIRQUE_PINNACLE_TAPPING_TERM 200
-# endif
-# endif
+# include "action.h"
+# include "action_tapping.h"
+# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){})
# endif
# ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE
# define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8)