Re: [RFC] Wiimote userspace interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry

On Wed, Aug 3, 2011 at 8:17 AM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> Hi David,
>
> On Sat, Jul 30, 2011 at 06:34:37PM +0200, David Herrmann wrote:
>> There is also the other side. Sending data to the wiimote. 4 LEDs can
>> be set, the rumble motor can be enabled/disabled and audio data can be
>> streamed. I think my current approach to use sysfs attributes for the
>> LEDs
>
> Depending on what exactly it is you may try registering LEDs as LED
> class devices. Having a sysfs attribute to light one of 4 leds is an
> option too.

I already looked at the API. Although the 4 LEDs of the wiimote can
only be switched on/off (no brightness modulation) I think I could
register 4 led_classdev structures. This would also allow software
blinking.

>> and RUMBLE motor is ok? I can't figure out any better way here.
>
> One of the input devices should be registered as ForceFeedback device
> (or you create a separate FF input device).

Ok, I will add that.

>> Reference-counting doesn't make sense. If multiple devices use them,
>> then they will always have conflicts, however, it still works.
>> Audio streaming is not yet implemented, but I think I could register
>> an alsa device so this needs not to be discussed here.
>>
>>
>> Currently I think Interface #2 would be the best way but I don't want
>> to spend time implementing that if you tell me it isn't acceptable.
>> Any comments on this are appreciated.
>
> I believe you should try presenting physical objects as input devices so
> I'd try presenting wiimote (with optional motion+ events) as one device
> and accessory (nunchuck, classic extension) as another device.

Yes, but the problem is, that this would enable all peripherals of the
wiimote, even though userspace may not need them. But if that is the
recommended way, I will implement it.

> The IR Cam data is a concern. Could you please describe a bit more what
> is being reported by the cam?

The IR cam tracks IR-LEDs. Up to 4 leds. It reports them as 2D
coordinates. The values can be used to use the wiimote with the
integrated cam as pointing device, but may also be used for other
purposes so I don't want to handle the IR values in the driver but
rather provide them to userspace.

> Thanks.
>
> --
> Dmitry

Regards
David
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux