diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /include/linux/joystick.h | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'include/linux/joystick.h')
-rw-r--r-- | include/linux/joystick.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index 2a3f1f8ba..513801cbe 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h @@ -2,9 +2,9 @@ #define _LINUX_JOYSTICK_H /* - * $Id: joystick.h,v 1.3 1998/03/30 11:10:40 mj Exp $ + * /usr/include/linux/joystick.h Version 1.0.9 * - * Copyright (C) 1997, 1998 Vojtech Pavlik + * Copyright (C) 1996-1998 Vojtech Pavlik */ #include <asm/types.h> @@ -13,26 +13,26 @@ * Version */ -#define JS_VERSION 0x00010007L /* 1.0.7 BCD */ +#define JS_VERSION 0x00010008L /* * 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 JSIOCGAXES _IOR('j', 0x11, __u8) /* get number of axes */ +#define JSIOCGBUTTONS _IOR('j', 0x12, __u8) /* get number of buttons */ -#define JSIOCSCORR _IOW('j', 0x21, struct js_corr[4]) /* set correction values */ -#define JSIOCGCORR _IOR('j', 0x22, struct js_corr[4]) /* get correction values */ +#define JSIOCSCORR _IOW('j', 0x21, struct js_corr[4]) /* set correction values */ +#define JSIOCGCORR _IOR('j', 0x22, struct js_corr[4]) /* get correction values */ /* * Types and constants for get/set correction */ -#define JS_CORR_NONE 0x00 /* returns raw values */ -#define JS_CORR_BROKEN 0x01 /* broken line */ +#define JS_CORR_NONE 0x00 /* returns raw values */ +#define JS_CORR_BROKEN 0x01 /* broken line */ struct js_corr { __s32 coef[8]; @@ -46,13 +46,13 @@ struct js_corr { #define JS_EVENT_BUTTON 0x01 /* button pressed/released */ #define JS_EVENT_AXIS 0x02 /* joystick moved */ -#define JS_EVENT_INIT 0x80 /* initial state of device */ +#define JS_EVENT_INIT 0x80 /* initial state of device at open time */ struct js_event { - __u32 time; /* time when event happened in miliseconds since open */ - __u16 value; /* new value */ - __u8 type; /* type of event, see above */ - __u8 number; /* axis/button number */ + __u32 time; /* event timestamp in miliseconds since open */ + __s16 value; /* value */ + __u8 type; /* type of event, see above */ + __u8 number; /* axis/button number */ }; /* @@ -62,16 +62,16 @@ struct js_event { #define JS_RETURN sizeof(struct JS_DATA_TYPE) #define JS_TRUE 1 #define JS_FALSE 0 -#define JS_X_0 0x01 /* bit mask for x-axis js0 */ -#define JS_Y_0 0x02 /* bit mask for y-axis js0 */ -#define JS_X_1 0x04 /* bit mask for x-axis js1 */ -#define JS_Y_1 0x08 /* bit mask for y-axis js1 */ -#define JS_MAX 2 /* max number of joysticks */ +#define JS_X_0 0x01 /* bit mask for x-axis js0 */ +#define JS_Y_0 0x02 /* bit mask for y-axis js0 */ +#define JS_X_1 0x04 /* bit mask for x-axis js1 */ +#define JS_Y_1 0x08 /* bit mask for y-axis js1 */ +#define JS_MAX 2 /* max number of joysticks */ struct JS_DATA_TYPE { - int buttons; /* immediate button state */ - int x; /* immediate x axis value */ - int y; /* immediate y axis value */ + int buttons; /* immediate button state */ + int x; /* immediate x axis value */ + int y; /* immediate y axis value */ }; |