J. Dosher wrote:

Are there any generic examples of interrupt mode usb drivers? At this
point I'm really not trying to do anything fancy, so I suspect that the
solution is really rather simple.

You seem to mean "interrupt transfers", where the endpoint descriptor says "run this every N frames" (or microframes). Those are used by the HID and HUB drivers, and for status channels by a few others.

These are indeed simple.  You submit an urb; it gets a completion
callback.  In 2.6 kernels, you're responsible for re-issuing it.
In all kernels, you're responsible for using the data from that URB,
maybe by copying it someplace useful.


I have read, write, and an irq function in my driver, but I NEVER see them
being called (the read and write are listed in my file_operations struct).
Since the device is sending out a packet every 2 seconds, I'd expect to
see the read function getting called, no?

That depends entirely on what your user mode code does. If it's issuing a read() on the right file descriptor, then yes it'd get called.

- Dave




------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to