Author Topic: Adding an OUT end point for HID Interface  (Read 6087 times)

coolsunny

  • Member
  • ***
  • Posts: 14
Adding an OUT end point for HID Interface
« on: October 15, 2013, 06:00:42 pm »
I am using Linux kernel 2.6.35 on iMX28 with a composite driver which is HID+Mass storage. The driver looks good and it comes with an IN end point for HID and it uses set_report for out transfers.

Is it possible to add a new OUT end point for HID so that my user space application can use OUT end point rather than control transfer (for out transfers)?.
Also I am not sure how these end points are decided. Are they based on the hardware OR these are the structures that we add with "static struct usb_endpoint_descriptor"?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Adding an OUT end point for HID Interface
« Reply #1 on: October 15, 2013, 09:09:09 pm »
The descriptors in the device define the endpoints for the HID interface.

If the HID interface has an interrupt OUT endpoint, the host can send Output reports to it. Of course the device must have code that supports receiving reports on the OUT endpoint.


coolsunny

  • Member
  • ***
  • Posts: 14
Re: Adding an OUT end point for HID Interface
« Reply #2 on: October 15, 2013, 09:25:22 pm »
If I understand it correctly, it is the change only in software and not necessarily the hardware has to support this extra end point?. Can I say that end points are software configurable and don't have to worry about the hardware support to some extent?.
Is the priority is given to OUT end point (if this is present) instead of control transfer(set_report)?.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Adding an OUT end point for HID Interface
« Reply #3 on: October 15, 2013, 10:00:58 pm »
The device hardware must support the added endpoint, but just about any USB device controller will support a HID interface with two interrupt endpoints.

The device firmware or other embedded code has to define the endpoint in the descriptors and provide code to receive data on the endpoint.

Under Windows, WriteFile uses the interrupt OUT endpoint if available and otherwise uses the control endpoint with Set_Report.

coolsunny

  • Member
  • ***
  • Posts: 14
Re: Adding an OUT end point for HID Interface
« Reply #4 on: October 15, 2013, 10:02:28 pm »
Perfect. Thanks Jan for your prompt response.