diff options
author | Stefan Kerkmann <[email protected]> | 2025-04-13 18:36:13 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2025-04-13 18:36:13 +0200 |
commit | a7bf8e64a584c9a0930f4aa701a09a6e1de7e117 (patch) | |
tree | 4f166d22c20c85e48d35e49d61bea24ce98c71e1 /drivers/sensors | |
parent | d0611b0468049f5aba69f1273fb94b8375934237 (diff) | |
download | qmk_firmware-a7bf8e64a584c9a0930f4aa701a09a6e1de7e117.tar.gz qmk_firmware-a7bf8e64a584c9a0930f4aa701a09a6e1de7e117.zip |
[chore]: move and rename mouse/scroll min/max defines (#25141)
* protocol: move {XY/HV}_REPORT_{MIN,MAX} into report.h
..to allow easier re-use in other code implementations.
* protocol: rename {XY/HV}_REPORT_{MIN/MAX} to MOUSE_REPORT_{XY/HV}_{MIN/MAX}
..to avoid naming collisions.
Diffstat (limited to 'drivers/sensors')
-rw-r--r-- | drivers/sensors/pimoroni_trackball.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c index afbe3d5b77..06e5042953 100644 --- a/drivers/sensors/pimoroni_trackball.c +++ b/drivers/sensors/pimoroni_trackball.c @@ -101,12 +101,12 @@ int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_di } mouse_xy_report_t pimoroni_trackball_adapt_values(xy_clamp_range_t *offset) { - if (*offset > XY_REPORT_MAX) { - *offset -= XY_REPORT_MAX; - return (mouse_xy_report_t)XY_REPORT_MAX; - } else if (*offset < XY_REPORT_MIN) { - *offset += XY_REPORT_MAX; - return (mouse_xy_report_t)XY_REPORT_MIN; + if (*offset > MOUSE_REPORT_XY_MAX) { + *offset -= MOUSE_REPORT_XY_MAX; + return (mouse_xy_report_t)MOUSE_REPORT_XY_MAX; + } else if (*offset < MOUSE_REPORT_XY_MIN) { + *offset += MOUSE_REPORT_XY_MAX; + return (mouse_xy_report_t)MOUSE_REPORT_XY_MIN; } else { mouse_xy_report_t temp_return = *offset; *offset = 0; |