1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI__UINPUT_H_ 8 #define _UAPI__UINPUT_H_ 9 #include <linux/types.h> 10 #include <linux/input.h> 11 #define UINPUT_VERSION 5 12 #define UINPUT_MAX_NAME_SIZE 80 13 struct uinput_ff_upload { 14 __u32 request_id; 15 __s32 retval; 16 struct ff_effect effect; 17 struct ff_effect old; 18 }; 19 struct uinput_ff_erase { 20 __u32 request_id; 21 __s32 retval; 22 __u32 effect_id; 23 }; 24 #define UINPUT_IOCTL_BASE 'U' 25 #define UI_DEV_CREATE _IO(UINPUT_IOCTL_BASE, 1) 26 #define UI_DEV_DESTROY _IO(UINPUT_IOCTL_BASE, 2) 27 struct uinput_setup { 28 struct input_id id; 29 char name[UINPUT_MAX_NAME_SIZE]; 30 __u32 ff_effects_max; 31 }; 32 #define UI_DEV_SETUP _IOW(UINPUT_IOCTL_BASE, 3, struct uinput_setup) 33 struct uinput_abs_setup { 34 __u16 code; 35 struct input_absinfo absinfo; 36 }; 37 #define UI_ABS_SETUP _IOW(UINPUT_IOCTL_BASE, 4, struct uinput_abs_setup) 38 #define UI_SET_EVBIT _IOW(UINPUT_IOCTL_BASE, 100, int) 39 #define UI_SET_KEYBIT _IOW(UINPUT_IOCTL_BASE, 101, int) 40 #define UI_SET_RELBIT _IOW(UINPUT_IOCTL_BASE, 102, int) 41 #define UI_SET_ABSBIT _IOW(UINPUT_IOCTL_BASE, 103, int) 42 #define UI_SET_MSCBIT _IOW(UINPUT_IOCTL_BASE, 104, int) 43 #define UI_SET_LEDBIT _IOW(UINPUT_IOCTL_BASE, 105, int) 44 #define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int) 45 #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int) 46 #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char *) 47 #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int) 48 #define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int) 49 #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload) 50 #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload) 51 #define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase) 52 #define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase) 53 #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len) 54 #define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 45, unsigned int) 55 #define EV_UINPUT 0x0101 56 #define UI_FF_UPLOAD 1 57 #define UI_FF_ERASE 2 58 struct uinput_user_dev { 59 char name[UINPUT_MAX_NAME_SIZE]; 60 struct input_id id; 61 __u32 ff_effects_max; 62 __s32 absmax[ABS_CNT]; 63 __s32 absmin[ABS_CNT]; 64 __s32 absfuzz[ABS_CNT]; 65 __s32 absflat[ABS_CNT]; 66 }; 67 #endif 68