aboutsummaryrefslogtreecommitdiff
path: root/quantum/pointing_device/pointing_device.c
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2024-02-28 21:47:37 +1100
committerNick Brassel <[email protected]>2024-02-28 21:47:37 +1100
commit4e369d405af6bba1adce6337b2e1b1ea1788566c (patch)
treeb0f020feff1809e37c9e7795d344929ff0bb290a /quantum/pointing_device/pointing_device.c
parent4e04da397ef643f8fcf4afbe1d19f63aee1fc561 (diff)
parentdd1706e468bb18dd7f7ae143de735a5d3be1bfb8 (diff)
downloadqmk_firmware-4e369d405af6bba1adce6337b2e1b1ea1788566c.tar.gz
qmk_firmware-4e369d405af6bba1adce6337b2e1b1ea1788566c.zip
Merge branch 'develop'0.24.0
Diffstat (limited to 'quantum/pointing_device/pointing_device.c')
-rw-r--r--quantum/pointing_device/pointing_device.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c
index 17dc701a41..bcced166c0 100644
--- a/quantum/pointing_device/pointing_device.c
+++ b/quantum/pointing_device/pointing_device.c
@@ -149,9 +149,9 @@ __attribute__((weak)) void pointing_device_init(void) {
pointing_device_driver.init();
#ifdef POINTING_DEVICE_MOTION_PIN
# ifdef POINTING_DEVICE_MOTION_PIN_ACTIVE_LOW
- setPinInputHigh(POINTING_DEVICE_MOTION_PIN);
+ gpio_set_pin_input_high(POINTING_DEVICE_MOTION_PIN);
# else
- setPinInput(POINTING_DEVICE_MOTION_PIN);
+ gpio_set_pin_input(POINTING_DEVICE_MOTION_PIN);
# endif
#endif
}
@@ -247,18 +247,19 @@ __attribute__((weak)) bool pointing_device_task(void) {
# error POINTING_DEVICE_MOTION_PIN not supported when sharing the pointing device report between sides.
# endif
# ifdef POINTING_DEVICE_MOTION_PIN_ACTIVE_LOW
- if (!readPin(POINTING_DEVICE_MOTION_PIN))
+ if (!gpio_read_pin(POINTING_DEVICE_MOTION_PIN))
# else
- if (readPin(POINTING_DEVICE_MOTION_PIN))
+ if (gpio_read_pin(POINTING_DEVICE_MOTION_PIN))
# endif
+ {
#endif
#if defined(SPLIT_POINTING_ENABLE)
# if defined(POINTING_DEVICE_COMBINED)
static uint8_t old_buttons = 0;
- local_mouse_report.buttons = old_buttons;
- local_mouse_report = pointing_device_driver.get_report(local_mouse_report);
- old_buttons = local_mouse_report.buttons;
+ local_mouse_report.buttons = old_buttons;
+ local_mouse_report = pointing_device_driver.get_report(local_mouse_report);
+ old_buttons = local_mouse_report.buttons;
# elif defined(POINTING_DEVICE_LEFT) || defined(POINTING_DEVICE_RIGHT)
local_mouse_report = POINTING_DEVICE_THIS_SIDE ? pointing_device_driver.get_report(local_mouse_report) : shared_mouse_report;
# else
@@ -268,6 +269,10 @@ __attribute__((weak)) bool pointing_device_task(void) {
local_mouse_report = pointing_device_driver.get_report(local_mouse_report);
#endif // defined(SPLIT_POINTING_ENABLE)
+#ifdef POINTING_DEVICE_MOTION_PIN
+ }
+#endif
+
// allow kb to intercept and modify report
#if defined(SPLIT_POINTING_ENABLE) && defined(POINTING_DEVICE_COMBINED)
if (is_keyboard_left()) {