Re: [PATCH 1/3] xpad.c: Added flags into xpad_device structure and removed dpad_mapping.

Dmitry Torokhov <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel.input,gmane.linux.kernel
Message-ID <[email protected]>
Hi Jan,

On Wednesday 02 May 2007 11:01, Jan Kratochvil wrote:
> This changes are expected to simplify further improves of this driver,
> We will need to add information if the driver is xbox360 device or not.
> 
> Second option was to simply add u8 is_360, but what if we'll need to know
> if device is a wheel? Or if the device can have keyboard (or headset) attached.
> 

...

> -#define MAP_DPAD_TO_BUTTONS    0
> -#define MAP_DPAD_TO_AXES       1
> -#define MAP_DPAD_UNKNOWN       -1
> +#define XPAD_FLAGS_DPAD_TO_BUTTONS    (1 << 0)
> +#define XPAD_FLAGS_DPAD_TO_AXES       (1 << 1)
> +#define XPAD_FLAGS_DPAD_UNKNOWN       (1 << 2)
> 

Turning this into bitmaps suggests that all of these could be set which is
not the case. Since there are 3 spare bytes in xpad_device structure to
use for additional flags/bitmaps I'd leave dpad_mapping alone.

-- 
Dmitry

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.