Re: Setting a HID report via an interrupt transfer.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Apr 2012, Dave Mielke wrote:

> In case it matters, the actual device I'm trying to use at this moment is a 
> Silicopn Labs CP2110 HID USB-to-UART bridge.
> 
> Reports 1-63 are used to send bytes to the device. The report number indicates 
> how many bytes are to be sent. For example, to send three bytes one would set 
> report 3 with the three bytes to be sent being the report's data. Document 
> AN434 (which describes the CP2110's reports) says that these reports (1-63) 
> need to be set using an interrupt transfer (as opposed to the usual way of 
> using a control transfer to do a set-report request). The CP2110 does have an 
> output interrupt endpoint - 2 - to which, I assume, something must be sent to 
> set the report.
> 
> Now for my (hopefully not too dumb) question: What's the correct way, using 
> USBFS operations, to set a report using an interrupt transfer?

There's nothing special about setting reports; all you do is a normal 
interrupt-OUT transfer.

With usbfs, you can send an interrupt transfer the same way you would
send a bulk transfer: the USBDEVFS_BULK ioctl.  Or if you prefer, you
can use the async interface with USBDEVFS_SUBMITURB, where urb->type is
set to either USBDEVFS_URB_TYPE_INTERRUPT or USBDEVFS_URB_TYPE_BULK
(the kernel will accept either one when urb->endpoint refers to an
interrupt endpoint).

Of course, if you're using usbfs then you have to detach the normal 
usbhid kernel driver from the interface first.  Presumably you're 
already aware of what that entails.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux