diff options
Diffstat (limited to 'tmk_core/protocol/ps2_mouse.c')
| -rw-r--r-- | tmk_core/protocol/ps2_mouse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c index a0e52bc7c..8df465026 100644 --- a/tmk_core/protocol/ps2_mouse.c +++ b/tmk_core/protocol/ps2_mouse.c | |||
| @@ -68,6 +68,8 @@ void ps2_mouse_init(void) { | |||
| 68 | 68 | ||
| 69 | __attribute__((weak)) void ps2_mouse_init_user(void) {} | 69 | __attribute__((weak)) void ps2_mouse_init_user(void) {} |
| 70 | 70 | ||
| 71 | __attribute__((weak)) void ps2_mouse_moved_user(report_mouse_t *mouse_report) {} | ||
| 72 | |||
| 71 | void ps2_mouse_task(void) { | 73 | void ps2_mouse_task(void) { |
| 72 | static uint8_t buttons_prev = 0; | 74 | static uint8_t buttons_prev = 0; |
| 73 | extern int tp_buttons; | 75 | extern int tp_buttons; |
| @@ -98,6 +100,9 @@ void ps2_mouse_task(void) { | |||
| 98 | #if PS2_MOUSE_SCROLL_BTN_MASK | 100 | #if PS2_MOUSE_SCROLL_BTN_MASK |
| 99 | ps2_mouse_scroll_button_task(&mouse_report); | 101 | ps2_mouse_scroll_button_task(&mouse_report); |
| 100 | #endif | 102 | #endif |
| 103 | if (mouse_report.x || mouse_report.y || mouse_report.v) { | ||
| 104 | ps2_mouse_moved_user(&mouse_report); | ||
| 105 | } | ||
| 101 | #ifdef PS2_MOUSE_DEBUG_HID | 106 | #ifdef PS2_MOUSE_DEBUG_HID |
| 102 | // Used to debug the bytes sent to the host | 107 | // Used to debug the bytes sent to the host |
| 103 | ps2_mouse_print_report(&mouse_report); | 108 | ps2_mouse_print_report(&mouse_report); |
