From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 20:11:06 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4822E1065673 for ; Tue, 15 Nov 2011 20:11:06 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id CA73E8FC14 for ; Tue, 15 Nov 2011 20:11:05 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so10487222bkb.13 for ; Tue, 15 Nov 2011 12:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=MKzEWoMfimv0RRrNgS0mQtZneqEXXFtyN7C3PF7VCz4=; b=jskzr0MASMVG+3vUo4/j0a+pzUmzimofQsgFChHsgJvM1fdazAMJnbmkEjEhQVc5cP gi4LQ/EC/UF4wi4Guf+ZxEds6qWE2RV/a0JWT3HfXRvakGU7wxZERrWkrXgebEOAXAar vxvTcQdNQiyrI4lrH/mB+Wx9TWK2Oq+QoZTn4= Received: by 10.205.130.1 with SMTP id hk1mr8345636bkc.68.1321387864308; Tue, 15 Nov 2011 12:11:04 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id i3sm18286650faf.0.2011.11.15.12.11.02 (version=SSLv3 cipher=OTHER); Tue, 15 Nov 2011 12:11:03 -0800 (PST) Sender: Alexander Motin Message-ID: <4EC2C757.4060303@FreeBSD.org> Date: Tue, 15 Nov 2011 22:11:03 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Marcus von Appen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current Subject: Re: uhid(4) and report structures X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2011 20:11:06 -0000 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