Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
analog.c File Reference
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/gameport.h>
#include <linux/jiffies.h>
#include <linux/timex.h>

Go to the source code of this file.

Data Structures

struct  analog
 
struct  analog_port
 
struct  analog_types
 

Macros

#define DRIVER_DESC   "Analog joystick and gamepad driver"
 
#define ANALOG_PORTS   16
 
#define ANALOG_RUDDER   0x00004
 
#define ANALOG_THROTTLE   0x00008
 
#define ANALOG_AXES_STD   0x0000f
 
#define ANALOG_BTNS_STD   0x000f0
 
#define ANALOG_BTNS_CHF   0x00100
 
#define ANALOG_HAT1_CHF   0x00200
 
#define ANALOG_HAT2_CHF   0x00400
 
#define ANALOG_HAT_FCS   0x00800
 
#define ANALOG_HATS_ALL   0x00e00
 
#define ANALOG_BTN_TL   0x01000
 
#define ANALOG_BTN_TR   0x02000
 
#define ANALOG_BTN_TL2   0x04000
 
#define ANALOG_BTN_TR2   0x08000
 
#define ANALOG_BTNS_TLR   0x03000
 
#define ANALOG_BTNS_TLR2   0x0c000
 
#define ANALOG_BTNS_GAMEPAD   0x0f000
 
#define ANALOG_HBTN_CHF   0x10000
 
#define ANALOG_ANY_CHF   0x10700
 
#define ANALOG_SAITEK   0x20000
 
#define ANALOG_EXTENSIONS   0x7ff00
 
#define ANALOG_GAMEPAD   0x80000
 
#define ANALOG_MAX_TIME   3 /* 3 ms */
 
#define ANALOG_LOOP_TIME   2000 /* 2 * loop */
 
#define ANALOG_SAITEK_DELAY   200 /* 200 us */
 
#define ANALOG_SAITEK_TIME   2000 /* 2000 us */
 
#define ANALOG_AXIS_TIME   2 /* 2 * refresh */
 
#define ANALOG_INIT_RETRIES   8 /* 8 times */
 
#define ANALOG_FUZZ_BITS   2 /* 2 bit more */
 
#define ANALOG_FUZZ_MAGIC   36 /* 36 u*ms/loop */
 
#define ANALOG_MAX_NAME_LENGTH   128
 
#define ANALOG_MAX_PHYS_LENGTH   32
 
#define FAKE_TIME
 
#define GET_TIME(x)   do { x = analog_faketime++; } while(0)
 
#define DELTA(x, y)   ((y)-(x))
 
#define TIME_NAME   "Unreliable"
 

Functions

 MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 module_param_array_named (map, js, charp,&js_nargs, 0)
 
 MODULE_PARM_DESC (map,"Describes analog joysticks type/capabilities")
 
 module_init (analog_init)
 
 module_exit (analog_exit)
 

Macro Definition Documentation

#define ANALOG_ANY_CHF   0x10700

Definition at line 81 of file analog.c.

#define ANALOG_AXES_STD   0x0000f

Definition at line 64 of file analog.c.

#define ANALOG_AXIS_TIME   2 /* 2 * refresh */

Definition at line 90 of file analog.c.

#define ANALOG_BTN_TL   0x01000

Definition at line 72 of file analog.c.

#define ANALOG_BTN_TL2   0x04000

Definition at line 74 of file analog.c.

#define ANALOG_BTN_TR   0x02000

Definition at line 73 of file analog.c.

#define ANALOG_BTN_TR2   0x08000

Definition at line 75 of file analog.c.

#define ANALOG_BTNS_CHF   0x00100

Definition at line 67 of file analog.c.

#define ANALOG_BTNS_GAMEPAD   0x0f000

Definition at line 78 of file analog.c.

#define ANALOG_BTNS_STD   0x000f0

Definition at line 65 of file analog.c.

#define ANALOG_BTNS_TLR   0x03000

Definition at line 76 of file analog.c.

#define ANALOG_BTNS_TLR2   0x0c000

Definition at line 77 of file analog.c.

#define ANALOG_EXTENSIONS   0x7ff00

Definition at line 83 of file analog.c.

#define ANALOG_FUZZ_BITS   2 /* 2 bit more */

Definition at line 92 of file analog.c.

#define ANALOG_FUZZ_MAGIC   36 /* 36 u*ms/loop */

Definition at line 93 of file analog.c.

#define ANALOG_GAMEPAD   0x80000

Definition at line 84 of file analog.c.

#define ANALOG_HAT1_CHF   0x00200

Definition at line 68 of file analog.c.

#define ANALOG_HAT2_CHF   0x00400

Definition at line 69 of file analog.c.

#define ANALOG_HAT_FCS   0x00800

Definition at line 70 of file analog.c.

#define ANALOG_HATS_ALL   0x00e00

Definition at line 71 of file analog.c.

#define ANALOG_HBTN_CHF   0x10000

Definition at line 80 of file analog.c.

#define ANALOG_INIT_RETRIES   8 /* 8 times */

Definition at line 91 of file analog.c.

#define ANALOG_LOOP_TIME   2000 /* 2 * loop */

Definition at line 87 of file analog.c.

#define ANALOG_MAX_NAME_LENGTH   128

Definition at line 95 of file analog.c.

#define ANALOG_MAX_PHYS_LENGTH   32

Definition at line 96 of file analog.c.

#define ANALOG_MAX_TIME   3 /* 3 ms */

Definition at line 86 of file analog.c.

#define ANALOG_PORTS   16

Definition at line 50 of file analog.c.

#define ANALOG_RUDDER   0x00004

Definition at line 62 of file analog.c.

#define ANALOG_SAITEK   0x20000

Definition at line 82 of file analog.c.

#define ANALOG_SAITEK_DELAY   200 /* 200 us */

Definition at line 88 of file analog.c.

#define ANALOG_SAITEK_TIME   2000 /* 2000 us */

Definition at line 89 of file analog.c.

#define ANALOG_THROTTLE   0x00008

Definition at line 63 of file analog.c.

#define DELTA (   x,
  y 
)    ((y)-(x))

Definition at line 173 of file analog.c.

#define DRIVER_DESC   "Analog joystick and gamepad driver"

Definition at line 40 of file analog.c.

#define FAKE_TIME

Definition at line 170 of file analog.c.

#define GET_TIME (   x)    do { x = analog_faketime++; } while(0)

Definition at line 172 of file analog.c.

#define TIME_NAME   "Unreliable"

Definition at line 174 of file analog.c.

Function Documentation

MODULE_AUTHOR ( "Vojtech Pavlik <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
module_exit ( analog_exit  )
module_init ( analog_init  )
MODULE_LICENSE ( "GPL"  )
module_param_array_named ( map  ,
js  ,
charp  ,
js_nargs,
 
)
MODULE_PARM_DESC ( map  ,
"Describes analog joysticks type/capabilities  
)