~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/joystick.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/joystick.h (Version linux-6.12-rc7) and /include/uapi/linux/joystick.h (Version linux-6.3.13)


  1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linu      1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  *  Copyright (C) 1996-2000 Vojtech Pavlik          3  *  Copyright (C) 1996-2000 Vojtech Pavlik
  4  *                                                  4  *
  5  *  Sponsored by SuSE                               5  *  Sponsored by SuSE
  6  */                                                 6  */
  7 /*                                                  7 /*
  8  * This program is free software; you can redi      8  * This program is free software; you can redistribute it and/or modify
  9  * it under the terms of the GNU General Publi      9  * it under the terms of the GNU General Public License as published by
 10  * the Free Software Foundation; either versio     10  * the Free Software Foundation; either version 2 of the License, or 
 11  * (at your option) any later version.             11  * (at your option) any later version.
 12  *                                                 12  * 
 13  * This program is distributed in the hope tha     13  * This program is distributed in the hope that it will be useful,
 14  * but WITHOUT ANY WARRANTY; without even the      14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR     15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16  * GNU General Public License for more details     16  * GNU General Public License for more details.
 17  *                                                 17  * 
 18  * You should have received a copy of the GNU      18  * You should have received a copy of the GNU General Public License
 19  * along with this program; if not, write to t     19  * along with this program; if not, write to the Free Software
 20  * Foundation, Inc., 59 Temple Place, Suite 33     20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 21  */                                                21  */
 22 #ifndef _UAPI_LINUX_JOYSTICK_H                     22 #ifndef _UAPI_LINUX_JOYSTICK_H
 23 #define _UAPI_LINUX_JOYSTICK_H                     23 #define _UAPI_LINUX_JOYSTICK_H
 24                                                    24 
 25                                                    25 
 26                                                    26 
 27 #include <linux/types.h>                           27 #include <linux/types.h>
 28 #include <linux/input.h>                           28 #include <linux/input.h>
 29                                                    29 
 30 /*                                                 30 /*
 31  * Version                                         31  * Version
 32  */                                                32  */
 33                                                    33 
 34 #define JS_VERSION              0x020100           34 #define JS_VERSION              0x020100
 35                                                    35 
 36 /*                                                 36 /*
 37  * Types and constants for reading from /dev/j     37  * Types and constants for reading from /dev/js
 38  */                                                38  */
 39                                                    39 
 40 #define JS_EVENT_BUTTON         0x01    /* but     40 #define JS_EVENT_BUTTON         0x01    /* button pressed/released */
 41 #define JS_EVENT_AXIS           0x02    /* joy     41 #define JS_EVENT_AXIS           0x02    /* joystick moved */
 42 #define JS_EVENT_INIT           0x80    /* ini     42 #define JS_EVENT_INIT           0x80    /* initial state of device */
 43                                                    43 
 44 struct js_event {                                  44 struct js_event {
 45         __u32 time;     /* event timestamp in      45         __u32 time;     /* event timestamp in milliseconds */
 46         __s16 value;    /* value */                46         __s16 value;    /* value */
 47         __u8 type;      /* event type */           47         __u8 type;      /* event type */
 48         __u8 number;    /* axis/button number      48         __u8 number;    /* axis/button number */
 49 };                                                 49 };
 50                                                    50 
 51 /*                                                 51 /*
 52  * IOCTL commands for joystick driver              52  * IOCTL commands for joystick driver
 53  */                                                53  */
 54                                                    54 
 55 #define JSIOCGVERSION           _IOR('j', 0x01     55 #define JSIOCGVERSION           _IOR('j', 0x01, __u32)                          /* get driver version */
 56                                                    56 
 57 #define JSIOCGAXES              _IOR('j', 0x11     57 #define JSIOCGAXES              _IOR('j', 0x11, __u8)                           /* get number of axes */
 58 #define JSIOCGBUTTONS           _IOR('j', 0x12     58 #define JSIOCGBUTTONS           _IOR('j', 0x12, __u8)                           /* get number of buttons */
 59 #define JSIOCGNAME(len)         _IOC(_IOC_READ     59 #define JSIOCGNAME(len)         _IOC(_IOC_READ, 'j', 0x13, len)                 /* get identifier string */
 60                                                    60 
 61 #define JSIOCSCORR              _IOW('j', 0x21     61 #define JSIOCSCORR              _IOW('j', 0x21, struct js_corr)                 /* set correction values */
 62 #define JSIOCGCORR              _IOR('j', 0x22     62 #define JSIOCGCORR              _IOR('j', 0x22, struct js_corr)                 /* get correction values */
 63                                                    63 
 64 #define JSIOCSAXMAP             _IOW('j', 0x31     64 #define JSIOCSAXMAP             _IOW('j', 0x31, __u8[ABS_CNT])                  /* set axis mapping */
 65 #define JSIOCGAXMAP             _IOR('j', 0x32     65 #define JSIOCGAXMAP             _IOR('j', 0x32, __u8[ABS_CNT])                  /* get axis mapping */
 66 #define JSIOCSBTNMAP            _IOW('j', 0x33     66 #define JSIOCSBTNMAP            _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1])  /* set button mapping */
 67 #define JSIOCGBTNMAP            _IOR('j', 0x34     67 #define JSIOCGBTNMAP            _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1])  /* get button mapping */
 68                                                    68 
 69 /*                                                 69 /*
 70  * Types and constants for get/set correction      70  * Types and constants for get/set correction
 71  */                                                71  */
 72                                                    72 
 73 #define JS_CORR_NONE            0x00    /* ret     73 #define JS_CORR_NONE            0x00    /* returns raw values */
 74 #define JS_CORR_BROKEN          0x01    /* bro     74 #define JS_CORR_BROKEN          0x01    /* broken line */
 75                                                    75 
 76 struct js_corr {                                   76 struct js_corr {
 77         __s32 coef[8];                             77         __s32 coef[8];
 78         __s16 prec;                                78         __s16 prec;
 79         __u16 type;                                79         __u16 type;
 80 };                                                 80 };
 81                                                    81 
 82 /*                                                 82 /*
 83  * v0.x compatibility definitions                  83  * v0.x compatibility definitions
 84  */                                                84  */
 85                                                    85 
 86 #define JS_RETURN               sizeof(struct      86 #define JS_RETURN               sizeof(struct JS_DATA_TYPE)
 87 #define JS_TRUE                 1                  87 #define JS_TRUE                 1
 88 #define JS_FALSE                0                  88 #define JS_FALSE                0
 89 #define JS_X_0                  0x01               89 #define JS_X_0                  0x01
 90 #define JS_Y_0                  0x02               90 #define JS_Y_0                  0x02
 91 #define JS_X_1                  0x04               91 #define JS_X_1                  0x04
 92 #define JS_Y_1                  0x08               92 #define JS_Y_1                  0x08
 93 #define JS_MAX                  2                  93 #define JS_MAX                  2
 94                                                    94 
 95 #define JS_DEF_TIMEOUT          0x1300             95 #define JS_DEF_TIMEOUT          0x1300
 96 #define JS_DEF_CORR             0                  96 #define JS_DEF_CORR             0
 97 #define JS_DEF_TIMELIMIT        10L                97 #define JS_DEF_TIMELIMIT        10L
 98                                                    98 
 99 #define JS_SET_CAL              1                  99 #define JS_SET_CAL              1
100 #define JS_GET_CAL              2                 100 #define JS_GET_CAL              2
101 #define JS_SET_TIMEOUT          3                 101 #define JS_SET_TIMEOUT          3
102 #define JS_GET_TIMEOUT          4                 102 #define JS_GET_TIMEOUT          4
103 #define JS_SET_TIMELIMIT        5                 103 #define JS_SET_TIMELIMIT        5
104 #define JS_GET_TIMELIMIT        6                 104 #define JS_GET_TIMELIMIT        6
105 #define JS_GET_ALL              7                 105 #define JS_GET_ALL              7
106 #define JS_SET_ALL              8                 106 #define JS_SET_ALL              8
107                                                   107 
108 struct JS_DATA_TYPE {                             108 struct JS_DATA_TYPE {
109         __s32 buttons;                            109         __s32 buttons;
110         __s32 x;                                  110         __s32 x;
111         __s32 y;                                  111         __s32 y;
112 };                                                112 };
113                                                   113 
114 struct JS_DATA_SAVE_TYPE_32 {                     114 struct JS_DATA_SAVE_TYPE_32 {
115         __s32 JS_TIMEOUT;                         115         __s32 JS_TIMEOUT;
116         __s32 BUSY;                               116         __s32 BUSY;
117         __s32 JS_EXPIRETIME;                      117         __s32 JS_EXPIRETIME;
118         __s32 JS_TIMELIMIT;                       118         __s32 JS_TIMELIMIT;
119         struct JS_DATA_TYPE JS_SAVE;              119         struct JS_DATA_TYPE JS_SAVE;
120         struct JS_DATA_TYPE JS_CORR;              120         struct JS_DATA_TYPE JS_CORR;
121 };                                                121 };
122                                                   122 
123 struct JS_DATA_SAVE_TYPE_64 {                     123 struct JS_DATA_SAVE_TYPE_64 {
124         __s32 JS_TIMEOUT;                         124         __s32 JS_TIMEOUT;
125         __s32 BUSY;                               125         __s32 BUSY;
126         __s64 JS_EXPIRETIME;                      126         __s64 JS_EXPIRETIME;
127         __s64 JS_TIMELIMIT;                       127         __s64 JS_TIMELIMIT;
128         struct JS_DATA_TYPE JS_SAVE;              128         struct JS_DATA_TYPE JS_SAVE;
129         struct JS_DATA_TYPE JS_CORR;              129         struct JS_DATA_TYPE JS_CORR;
130 };                                                130 };
131                                                   131 
132                                                   132 
133 #endif /* _UAPI_LINUX_JOYSTICK_H */               133 #endif /* _UAPI_LINUX_JOYSTICK_H */
134                                                   134 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php