From a2c10460ccfbde54cd87bff91da36fec2f474245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Tue, 12 Apr 2005 18:57:44 +0000 Subject: [PATCH] * added TRACE info * we now put data in cbuf at the good offset The mouse is now working ok in Haiku, tested with input_server. The current implementation based on our cbuf isn't good, as we're erasing old data, if mouse input addon can't keep up with interrupts. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12352 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/input/ps2_hid/mouse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/drivers/input/ps2_hid/mouse.c b/src/add-ons/kernel/drivers/input/ps2_hid/mouse.c index 61bab3b20a..f23f987b99 100644 --- a/src/add-ons/kernel/drivers/input/ps2_hid/mouse.c +++ b/src/add-ons/kernel/drivers/input/ps2_hid/mouse.c @@ -187,6 +187,8 @@ ps2_packet_to_movement(uint8 packet[], mouse_movement *pos) pos->timestamp = currentTime; pos->wheel_ydelta = (int)wheel_ydelta; pos->wheel_xdelta = (int)wheel_xdelta; + + TRACE(("xdelta: %d, ydelta: %d, buttons %x, clicks: %d, timestamp %Ld\n", xDelta, yDelta, buttons, sClickCount, currentTime)); } } @@ -230,7 +232,7 @@ static int32 handle_mouse_interrupt(void* data) { int8 read; - TRACE(("mouse interrupt occurred!!!\n")); + //TRACE(("mouse interrupt occurred!!!\n")); read = gIsa->read_io_8(PS2_PORT_CTRL); @@ -240,7 +242,8 @@ handle_mouse_interrupt(void* data) } read = read_data_byte(); - cbuf_memcpy_to_chain(sMouseChain, 0, &read, sizeof(read)); + TRACE(("mouse interrupt : byte %x\n", read)); + cbuf_memcpy_to_chain(sMouseChain, sSync, &read, sizeof(read)); if (sSync == 0 && !(read & 8)) { TRACE(("mouse resynched, bad data\n"));