0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _UAPI_HIDRAW_H
0015 #define _UAPI_HIDRAW_H
0016
0017
0018
0019 #include <linux/hid.h>
0020 #include <linux/types.h>
0021
0022 struct hidraw_report_descriptor {
0023 __u32 size;
0024 __u8 value[HID_MAX_DESCRIPTOR_SIZE];
0025 };
0026
0027 struct hidraw_devinfo {
0028 __u32 bustype;
0029 __s16 vendor;
0030 __s16 product;
0031 };
0032
0033
0034 #define HIDIOCGRDESCSIZE _IOR('H', 0x01, int)
0035 #define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor)
0036 #define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo)
0037 #define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len)
0038 #define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len)
0039
0040 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
0041 #define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
0042 #define HIDIOCGRAWUNIQ(len) _IOC(_IOC_READ, 'H', 0x08, len)
0043
0044 #define HIDIOCSINPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x09, len)
0045 #define HIDIOCGINPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0A, len)
0046
0047 #define HIDIOCSOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0B, len)
0048 #define HIDIOCGOUTPUT(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x0C, len)
0049
0050 #define HIDRAW_FIRST_MINOR 0
0051 #define HIDRAW_MAX_DEVICES 64
0052
0053 #define HIDRAW_BUFFER_SIZE 64
0054
0055
0056
0057
0058 #endif