On Wed, Sep 01, 2004 at 12:00:54AM -0400, Dan Streetman wrote:
> 
> On Tue, 31 Aug 2004, Vojtech Pavlik wrote:
> 
> >> -D-pad up/down/right/left
> >
> >Can be mapped to HATxX and HATxY.  Needs incrementing "x" if more real
> >hats/d-pads are found/
> 
> I'm not sure how to map it right, I think that the D-pad up/down should 
> map to HATxY and left/right to HATxX, with the hat_min/hat_max being 
> -1/0 (down/left) and 0/1 (up/right).  But, there can't be two controls 
> with the same usage->code, i.e. the D-pad up and D-pad down can't both be 
> mapped to ABS_HATxY, as the code that test_and_set_bit() after the 
> switch() will increment the usage->code.

There is a similar piece of code for the hats (mapping to two events),
you should be able to reuse that.

> So should both D-pad up and D-pad down get mapped to ABS_HATxY (and 
> similar for left/right) or should up get ABS_HAT0Y (or next available) and 
> down get ABS_HAT1Y?
 
Both up and down should be on HATxY. I think up is negative, though -
check the HID spec for axis directions.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to