You wrote: > My current driver for our IR sensor peripheral uses the HIDDEV > interface. It performs read() on /dev/usb/hiddevX, which results in > interrupt transfers of all inbound data. Kudos to Mr. Stewart and Mr. > Pavlik for making this very simple!
Do read()s actually result in interrupt transfers? Here's some background. I am using a PIC 16C765 in a project, and I am using a modified version of the Microchip USB firmware. As you may be aware, the original Microchip firmware emulated a HID mouse, and it sends reports over EP1 (an interrupt in endpoint). I modified the HID descriptors so that the input subsystem would not detect this device as a mouse, and then whipped up an event-reading application based on code in 2.4.18's hiddev.h. >From what I can tell, using IOCTLs to read reports works just fine (using Interrupt IN transfers). However, if I switch to using a read() on /dev/usb/hiddevX, I get garbage, and my primitive LED-based debugging tells me that the hiddev driver is now using GetReport requests over the control endpoint, and that code is commented out in the firmware. I know that the GetReport requests are required, but it would seem to me that GetReport requests should be triggered by ioctls, and that read() should return events sent in over Interrupt IN endpoints. IMHO, this would better fit the model of a device that gets polled at a constant rate, but doesn't always have new values for reports (i.e. it NAKs the interrupt in transfer when the report is not new). Do I have this backwards? Or is read() really doing interrupt in transfers, and my PIC code is broken somewhere else? Also, would I be better off trying this under 2.5? -- Charles Lepple <[EMAIL PROTECTED]> http://www.ghz.cc/charles/ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel