File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -85,23 +85,19 @@ void ps2_mouse_task(void)
85
85
if (debug_mouse ) print ("ps2_mouse: fail to get mouse packet\n" );
86
86
return ;
87
87
}
88
- xprintf ("%ud " , timer_read ());
89
- print ("ps2_mouse raw: [" );
90
- phex (mouse_report .buttons ); print ("|" );
91
- print_hex8 ((uint8_t )mouse_report .x ); print (" " );
92
- print_hex8 ((uint8_t )mouse_report .y ); print ("]\n" );
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
93
96
94
97
/* if mouse moves or buttons state changes */
95
98
if (mouse_report .x || mouse_report .y ||
96
99
((mouse_report .buttons ^ buttons_prev ) & PS2_MOUSE_BTN_MASK )) {
97
100
98
- #ifdef PS2_MOUSE_DEBUG
99
- print ("ps2_mouse raw: [" );
100
- phex (mouse_report .buttons ); print ("|" );
101
- print_hex8 ((uint8_t )mouse_report .x ); print (" " );
102
- print_hex8 ((uint8_t )mouse_report .y ); print ("]\n" );
103
- #endif
104
-
105
101
buttons_prev = mouse_report .buttons ;
106
102
107
103
// PS/2 mouse data is '9-bit integer'(-256 to 255) which is comprised of sign-bit and 8-bit value.
You can’t perform that action at this time.
0 commit comments