patch-2.4.4 linux/include/linux/joystick.h
Next file: linux/include/linux/kernel.h
Previous file: linux/include/linux/isdnif.h
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Wed Apr 11 19:02:30 2001
- Orig file:
v2.4.3/linux/include/linux/joystick.h
- Orig date:
Wed Jun 21 08:22:21 2000
diff -u --recursive --new-file v2.4.3/linux/include/linux/joystick.h linux/include/linux/joystick.h
@@ -2,7 +2,7 @@
#define _LINUX_JOYSTICK_H
/*
- * $Id: joystick.h,v 1.2 2000/05/29 10:54:53 vojtech Exp $
+ * $Id: joystick.h,v 1.3 2000/11/30 11:07:05 vojtech Exp $
*
* Copyright (C) 1996-2000 Vojtech Pavlik
*
@@ -30,12 +30,13 @@
*/
#include <asm/types.h>
+#include <linux/input.h>
/*
* Version
*/
-#define JS_VERSION 0x020000
+#define JS_VERSION 0x020100
/*
* Types and constants for reading from /dev/js
@@ -46,7 +47,7 @@
#define JS_EVENT_INIT 0x80 /* initial state of device */
struct js_event {
- __u32 time; /* event timestamp in miliseconds */
+ __u32 time; /* event timestamp in milliseconds */
__s16 value; /* value */
__u8 type; /* event type */
__u8 number; /* axis/button number */
@@ -56,14 +57,19 @@
* IOCTL commands for joystick driver
*/
-#define JSIOCGVERSION _IOR('j', 0x01, __u32) /* get driver version */
+#define JSIOCGVERSION _IOR('j', 0x01, __u32) /* get driver version */
-#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */
-#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */
-#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */
-
-#define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */
-#define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */
+#define JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */
+#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */
+#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */
+
+#define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */
+#define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */
+
+#define JSIOCSAXMAP _IOW('j', 0x31, __u8[ABS_MAX]) /* set axis mapping */
+#define JSIOCGAXMAP _IOR('j', 0x32, __u8[ABS_MAX]) /* get axis mapping */
+#define JSIOCSBTNMAP _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC]) /* set button mapping */
+#define JSIOCGBTNMAP _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC]) /* get button mapping */
/*
* Types and constants for get/set correction
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)