Discussion:
How to get USB HID Interrupt ?
(too old to reply)
Kid
2010-06-28 03:26:25 UTC
Permalink
Hi

I want to filter USB HID device ISR , is there some way to get these device
interrupts in kernel mode ? I remember that USB uses polling methods but not
interrupt , are there some standard IDs about KB and mouse events for me
reference ?

Thank for your teaching .
Maxim S. Shatskih
2010-06-28 17:37:43 UTC
Permalink
Post by Kid
I want to filter USB HID device ISR
There is no such thing, there are only interrupt pipe packets.

Yes, you can filter them, both on USB stack level and HID stack level.
--
Maxim S. Shatskih
Windows DDK MVP
***@storagecraft.com
http://www.storagecraft.com
Kid
2010-06-29 01:34:32 UTC
Permalink
This post might be inappropriate. Click to display it.
Maxim S. Shatskih
2010-06-29 16:34:56 UTC
Permalink
Post by Kid
Do you mean USB always us the way of polling ?
Yes. Only the host controller itself can do interrupts, and the protocol between the HC and the device is polling-only.
Post by Kid
So I should get the input data inside io control function ?
Yes.
--
Maxim S. Shatskih
Windows DDK MVP
***@storagecraft.com
http://www.storagecraft.com
Tim Roberts
2010-06-30 06:44:55 UTC
Permalink
Post by Kid
Do you mean USB always us the way of polling ?
No, it's more complicated than that. USB is a protocol bus, and the
bandwidth is shared amongst all of the devices on the bus. The USB
hardware does use interrupts to let the host controller driver know that
there are things to handle. That driver will then notify USB client
drivers that their requests have completed.

So, effectively, a USB client driver can pretend that it is getting
interrupts, but they appear as the completion routine for the requests it
submits.
Post by Kid
So I should get the input data inside io control function ?
There are well-defined ways of filtering mouse and keyboard events, some of
which don't require a driver at all. It depends what you need your filter
to do.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Loading...