[haiku-development] Re: USB "Joysticks"?

On Mon, 23 May 2011 20:57:10 -0700, pete.goodeve@xxxxxxxxxxxx wrote:
On Mon, May 23, 2011 at 06:48:19PM -0700, pete.goodeve@xxxxxxxxxxxx wrote:
On Tue, May 24, 2011 at 12:26:43AM +0200, Michael Lotz wrote:
>
> In any case, please see ticket #7354 which is about adding tablet and > gamepad/joystick support to usb_hid via new *Device classes. At least
> parts of that are usable. It might need extension to work for your
> case.
Thanks. That's going to take a bit of digesting, though, as I'm completely
unfamiliar with the protocol.  Any good pointers?

I should mention that I *have* now downloaded the USB-HID Spec, and
have begun exploring that.

Most of what you'll need should already be in the GamepadDevice.zip attached to that ticket. It doesn't actually check the type of device though, so it will most likely snatch away the mouse. But adding the right IDs and checking for them should be rather easy (you might need specific joystick IDs, but they should be added to the same handler as joysticks and gamepads should be similar enough to handle them both at the same place). The interface into the BJoystick API is already there as well, I haven't checked if it is correct or working though.

You mention in the
comments there that there was a usb_hid joystick driver in the 'mailing
list' -- I assume this one -- but I can't track it down.

...and Sean has sent me this.

That might just have referred to some WIP code that was floating around at the time, I don't remember what exactly it concerned. The GamepadDevice is definitely the most promising I've seen so far.

Regards
Michael

Other related posts: