Re: uhid(4) and report structures

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Tue, 15 Nov 2011 22:11:03 +0200
On 15.11.2011 21:29, Marcus von Appen wrote:
> I wonder, if I am correct with my assumption that the usb_ctl_report*
> structures mentioned in uhid(4) have to be defined and created by the
> code portion that uses the USB_GET_REPORT(), USB_SET_REPORT(),
> ... calls.
>
> In FreeBSD<  800063 we defined them in the header files of the USB
> subsystem. After the rewrite those struct definitions vanished.  Will
> the USB_ macros mentioned in uhid(4) "just" return a byte sequence
> (that's what I understand from the UHID specification) so that code,
> which uses those calls, can implement its own struct container for the
> information retrieved?
>
> Thanks for shedding some light on this. In case i am correct with what I
> wrote above, it might make sense to mention it in uhid(4).

In new USB stack these calls use struct usb_gen_descriptor argument. 
Difficult to say why it was done, but it was. To hide that I've recently 
added two wrapper functions to the libusbhid in HEAD: hid_get_report() 
and hid_set_report().

-- 
Alexander Motin
Received on Tue Nov 15 2011 - 19:11:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC