diff options
author | Thomas <[email protected]> | 2022-09-24 17:44:14 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-24 08:44:14 -0700 |
commit | 94d5fe6f908077e22a2445b3accda8d130135156 (patch) | |
tree | bbc07970f0324ec4028d68775d250cc155cdc076 /quantum/pointing_device/pointing_device.c | |
parent | c932e76d364e2a4d766a61acca4a535c5a0a6888 (diff) | |
download | qmk_firmware-94d5fe6f908077e22a2445b3accda8d130135156.tar.gz qmk_firmware-94d5fe6f908077e22a2445b3accda8d130135156.zip |
Allow Active High for Pointing Device Motion Pin (#18404)
Needed by the Cirque Trackpad for motion detection
Diffstat (limited to 'quantum/pointing_device/pointing_device.c')
-rw-r--r-- | quantum/pointing_device/pointing_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index e91de018f1..6981f850d0 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -144,7 +144,11 @@ __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); +# else + setPinInput(POINTING_DEVICE_MOTION_PIN); +# endif #endif } @@ -236,7 +240,11 @@ __attribute__((weak)) void pointing_device_task(void) { # if defined(SPLIT_POINTING_ENABLE) # 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)) +# else + if (readPin(POINTING_DEVICE_MOTION_PIN)) +# endif #endif #if defined(SPLIT_POINTING_ENABLE) |