From: Vojtech Pavlik <vojtech@suse.cz>
To: xerces8 <xerces8@butn.net>
Cc: linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: USB mouse protocol,
Date: Wed, 30 Apr 2008 13:18:16 +0200 [thread overview]
Message-ID: <20080430111816.GA9876@suse.cz> (raw)
In-Reply-To: <WorldClient-F200804301128.AA28590066@butn.net>
On Wed, Apr 30, 2008 at 11:28:59AM +0200, xerces8 wrote:
> Hi!
>
> I'm curious about some details in the protocol used by USB mice.
> A cursory look at the "Device Class Definition for HID 1.11" documents
> tells me (note this is the first USB technical document I ever read)
> that a mouse can tell the host the format (the protocol) used to report
> data (movement, button state etc.).
>
> Also a quick look into linuxv2.6.25/drivers/hid/usbhid/usbmouse.c suggests
> that 8 bits are used for position.
>
> So my questions are:
> - is the position data always 8 bits wide ?
No. The driver you need to look at is usbhid.ko, not usbmouse - that
only works for the static "HID Boot Protocol", and is only useful in
embedded devices.
> - when are reports sent ? Are they polled by host ? Or sent by the device
> on its own ?
That depends on how you look at it. The host controller polls the device
at a specified rate - typically 100Hz, but the device decides whether it
will or won't send a report when polled.
--
Vojtech Pavlik
Director SuSE Labs
next prev parent reply other threads:[~2008-04-30 11:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 9:28 USB mouse protocol, xerces8
2008-04-30 11:18 ` Vojtech Pavlik [this message]
[not found] ` <20080430111816.GA9876-AlSwsSmVLrQ@public.gmane.org>
2008-04-30 14:07 ` xerces8
2008-04-30 14:12 ` Vojtech Pavlik
2008-05-01 15:29 ` Anssi Hannula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080430111816.GA9876@suse.cz \
--to=vojtech@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=xerces8@butn.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).