Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
xpad.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/module.h>
#include <linux/usb/input.h>

Go to the source code of this file.

Data Structures

struct  xpad_device
 
struct  usb_xpad
 

Macros

#define DRIVER_AUTHOR   "Marko Friedemann <[email protected]>"
 
#define DRIVER_DESC   "X-Box pad driver"
 
#define XPAD_PKT_LEN   32
 
#define MAP_DPAD_TO_BUTTONS   (1 << 0)
 
#define MAP_TRIGGERS_TO_BUTTONS   (1 << 1)
 
#define MAP_STICKS_TO_NULL   (1 << 2)
 
#define DANCEPAD_MAP_CONFIG
 
#define XTYPE_XBOX   0
 
#define XTYPE_XBOX360   1
 
#define XTYPE_XBOX360W   2
 
#define XTYPE_UNKNOWN   3
 
#define XPAD_XBOX360_VENDOR_PROTOCOL(vend, pr)
 
#define XPAD_XBOX360_VENDOR(vend)
 

Functions

 module_param (dpad_to_buttons, bool, S_IRUGO)
 
 MODULE_PARM_DESC (dpad_to_buttons,"Map D-PAD to buttons rather than axes for unknown pads")
 
 module_param (triggers_to_buttons, bool, S_IRUGO)
 
 MODULE_PARM_DESC (triggers_to_buttons,"Map triggers to buttons rather than axes for unknown pads")
 
 module_param (sticks_to_null, bool, S_IRUGO)
 
 MODULE_PARM_DESC (sticks_to_null,"Do not map sticks at all for unknown pads")
 
 MODULE_DEVICE_TABLE (usb, xpad_table)
 
 module_usb_driver (xpad_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DANCEPAD_MAP_CONFIG
Value:
MAP_TRIGGERS_TO_BUTTONS | MAP_STICKS_TO_NULL)

Definition at line 93 of file xpad.c.

#define DRIVER_AUTHOR   "Marko Friedemann <[email protected]>"

Definition at line 83 of file xpad.c.

#define DRIVER_DESC   "X-Box pad driver"

Definition at line 84 of file xpad.c.

#define MAP_DPAD_TO_BUTTONS   (1 << 0)

Definition at line 90 of file xpad.c.

#define MAP_STICKS_TO_NULL   (1 << 2)

Definition at line 92 of file xpad.c.

#define MAP_TRIGGERS_TO_BUTTONS   (1 << 1)

Definition at line 91 of file xpad.c.

#define XPAD_PKT_LEN   32

Definition at line 86 of file xpad.c.

#define XPAD_XBOX360_VENDOR (   vend)
Value:

Definition at line 234 of file xpad.c.

#define XPAD_XBOX360_VENDOR_PROTOCOL (   vend,
  pr 
)
Value:
.match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \
.idVendor = (vend), \

Definition at line 228 of file xpad.c.

#define XTYPE_UNKNOWN   3

Definition at line 99 of file xpad.c.

#define XTYPE_XBOX   0

Definition at line 96 of file xpad.c.

#define XTYPE_XBOX360   1

Definition at line 97 of file xpad.c.

#define XTYPE_XBOX360W   2

Definition at line 98 of file xpad.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
xpad_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( dpad_to_buttons  ,
bool  ,
S_IRUGO   
)
module_param ( triggers_to_buttons  ,
bool  ,
S_IRUGO   
)
module_param ( sticks_to_null  ,
bool  ,
S_IRUGO   
)
MODULE_PARM_DESC ( dpad_to_buttons  ,
"Map D-PAD to buttons rather than axes for unknown pads"   
)
MODULE_PARM_DESC ( triggers_to_buttons  ,
"Map triggers to buttons rather than axes for unknown pads"   
)
MODULE_PARM_DESC ( sticks_to_null  ,
"Do not map sticks at all for unknown pads"   
)
module_usb_driver ( xpad_driver  )