diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2022-08-29 19:16:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 19:16:49 +0200 |
commit | e99ec28f5fffc41ce2662e883f7e9b56383d758b (patch) | |
tree | 121c7473da8a04ebffa8d848bdaca22b7b3ec5e6 /quantum/pointing_device/pointing_device_drivers.c | |
parent | d910e8df77150bab0b9cc2c3794554b4c8c81d71 (diff) |
[Core] Introduce pointing device specific debug messages (#17663)
Diffstat (limited to 'quantum/pointing_device/pointing_device_drivers.c')
-rw-r--r-- | quantum/pointing_device/pointing_device_drivers.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/quantum/pointing_device/pointing_device_drivers.c b/quantum/pointing_device/pointing_device_drivers.c index b96f8ff4b3..096ad5d028 100644 --- a/quantum/pointing_device/pointing_device_drivers.c +++ b/quantum/pointing_device/pointing_device_drivers.c @@ -17,6 +17,7 @@ */ #include "pointing_device.h" +#include "pointing_device_internal.h" #include "debug.h" #include "wait.h" #include "timer.h" @@ -32,10 +33,7 @@ report_mouse_t adns5050_get_report(report_mouse_t mouse_report) { report_adns5050_t data = adns5050_read_burst(); if (data.dx != 0 || data.dy != 0) { -# ifdef CONSOLE_ENABLE - if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); -# endif - + pd_dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); mouse_report.x = (mouse_xy_report_t)data.dx; mouse_report.y = (mouse_xy_report_t)data.dy; } @@ -76,9 +74,7 @@ const pointing_device_driver_t pointing_device_driver = { report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) { report_analog_joystick_t data = analog_joystick_read(); -# ifdef CONSOLE_ENABLE - if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); -# endif + pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); mouse_report.x = data.x; mouse_report.y = data.y; @@ -140,11 +136,9 @@ report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) { return mouse_report; } -# if CONSOLE_ENABLE - if (debug_mouse && touchData.touchDown) { - dprintf("cirque_pinnacle touchData x=%4d y=%4d z=%2d\n", touchData.xValue, touchData.yValue, touchData.zValue); + if (touchData.touchDown) { + pd_dprintf("cirque_pinnacle touchData x=%4d y=%4d z=%2d\n", touchData.xValue, touchData.yValue, touchData.zValue); } -# endif // Scale coordinates to arbitrary X, Y resolution cirque_pinnacle_scale_data(&touchData, cirque_pinnacle_get_scale(), cirque_pinnacle_get_scale()); @@ -227,9 +221,7 @@ const pointing_device_driver_t pointing_device_driver = { report_mouse_t paw3204_get_report(report_mouse_t mouse_report) { report_paw3204_t data = paw3204_read(); if (data.isMotion) { -# ifdef CONSOLE_ENABLE - dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); -# endif + pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); mouse_report.x = data.x; mouse_report.y = data.y; @@ -329,7 +321,7 @@ report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report) { if (!in_motion) { in_motion = true; - dprintf("PWM3360 (0): starting motion\n"); + pd_dprintf("PWM3360 (0): starting motion\n"); } mouse_report.x = CONSTRAIN_HID_XY(report.delta_x); |