input: add BUTTON(n) define for the button byte
authorAlan Cox <alan@linux.intel.com>
Sun, 15 Apr 2018 13:48:01 +0000 (14:48 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 15 Apr 2018 13:48:01 +0000 (14:48 +0100)
Kernel/include/input.h

index 6c936d1..907b257 100644 (file)
                                            bits show u/d and 3 spare bits */
 #define                KEYPRESS_DOWN   0x00
 #define                KEYPRESS_UP     0x01
+#define        LIGHTPEN_ABS    0x50            /* Light pen or similar, 16 x 16bit virtual coords */
 
-#define BUTTONS(x)     ((x)&0x0F)      /* 1-4 buttons */
+#define BUTTON(x)      (1 << (x))      /* Button 1-7 (top bit never used) */
+#define BUTTONS(x)     ((x)&0x07)      /* 0-7 buttons */
 
 
 #define INPUT_GRABKB   0x0520