Skip to content

Commit de41aa1

Browse files
committed
core: Fix ps2_mouse.c debug print
1 parent d79d925 commit de41aa1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

protocol/ps2_mouse.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,19 @@ void ps2_mouse_task(void)
8585
if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n");
8686
return;
8787
}
88-
89-
#ifdef PS2_MOUSE_DEBUG
90-
xprintf("%ud ", timer_read());
91-
print("ps2_mouse raw: [");
92-
phex(mouse_report.buttons); print("|");
93-
print_hex8((uint8_t)mouse_report.x); print(" ");
94-
print_hex8((uint8_t)mouse_report.y); print("]\n");
95-
#endif
9688

9789
/* if mouse moves or buttons state changes */
9890
if (mouse_report.x || mouse_report.y ||
9991
((mouse_report.buttons ^ buttons_prev) & PS2_MOUSE_BTN_MASK)) {
10092

93+
#ifdef PS2_MOUSE_DEBUG
94+
xprintf("%ud ", timer_read());
95+
print("ps2_mouse raw: [");
96+
phex(mouse_report.buttons); print("|");
97+
print_hex8((uint8_t)mouse_report.x); print(" ");
98+
print_hex8((uint8_t)mouse_report.y); print("]\n");
99+
#endif
100+
101101
buttons_prev = mouse_report.buttons;
102102

103103
// PS/2 mouse data is '9-bit integer'(-256 to 255) which is comprised of sign-bit and 8-bit value.

0 commit comments

Comments
 (0)