Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2019 15:20:41 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Stephane D'Alu <stephane.dalu@gmail.com>, freebsd-usb@freebsd.org
Subject:   Re: Implemeting xbox one controller on uhid
Message-ID:  <342406ee-c51e-0691-5560-4f49de90c83f@selasky.org>
In-Reply-To: <ff5b0e3e-1929-e4f3-3e64-4c413b5464d1@gmail.com>
References:  <ff5b0e3e-1929-e4f3-3e64-4c413b5464d1@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-06-27 15:16, Stephane D'Alu wrote:
> Hi
> 
> I'm still trying to implement the xbox one controller on the kernel
> uhid [2] module, based on the linux xpad.c [1]
> 
> I've found that I need, during the attach phase, to write an init packet 
> on the interrupt endpoint; on linux this is done using the USB request 
> buffer (URB) [l.1041].
> On freebsd I'm kind of stuck on the function that I should use to 
> transmit such a packet, I've tried the usbd_req_set_report, but it 
> doesn't look like the right function.
> 
> any help welcome
> 
> 
> [1] https://github.com/paroj/xpad/blob/master/xpad.c
> [2] /usr/src/sys/dev/usb/input/uhid.c
> 

Hi,

For sending a interrupt endpoint message you need to allocate an own USB 
transfer. The usbd_req_set_report() only works on the control endpoint.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?342406ee-c51e-0691-5560-4f49de90c83f>