diff options
Diffstat (limited to 'driver/mouse.c')
| -rw-r--r-- | driver/mouse.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/driver/mouse.c b/driver/mouse.c index c292d97..787c7a6 100644 --- a/driver/mouse.c +++ b/driver/mouse.c @@ -33,7 +33,6 @@ bool mouse_worker() { kpanic("mouse buffer full"); // heavy debugging } - bool wake=false; while(ringbuffer_has(&mouse_in)){ mouse_handler(ringbuffer_get(&mouse_in)); @@ -146,14 +145,18 @@ void mouse_action() if(mouse_byte[0]&0x80) { +#ifdef LOG_MOUSE_WARN + klog("x overflow"); +#endif return; - // klog("x overflow"); } if(mouse_byte[0]&0x40) { +#ifdef LOG_MOUSE_WARN + klog("y overflow"); +#endif return; - // klog("y overflow"); } rel_x = mouse_byte[1] - ((mouse_byte[0] << 4) & 0x100); @@ -176,7 +179,9 @@ void mouse_handler(uint8_t byte)//struct regs *a_r) //struct regs *a_r (not used // this bit is ALWAYS one, otherwise we are out of sync! if(!(mouse_byte[0]&0x8)) { -// klog("mouse out of sync (try next packet) ..."); +#ifdef LOG_MOUSE_WARN + klog("mouse out of sync"); +#endif mouse_cycle--; } |
