1 #include "hidrawconv.h"
3 static const KeyBit keybits[]= {
4 { "EV_KEY BTN_1", 6, 0x01 },
5 { "EV_KEY BTN_2", 6, 0x02 },
6 { "EV_KEY BTN_3", 6, 0x04 },
7 { "EV_KEY BTN_4", 6, 0x08 },
8 { "EV_KEY BTN_5", 6, 0x10 },
9 { "EV_KEY BTN_6", 6, 0x20 },
10 { "EV_KEY BTN_THUMBL", 7, 0x01 },
11 { "EV_KEY BTN_THUMBR", 7, 0x02 },
12 { "EV_KEY BTN_TL", 6, 0x40 },
13 { "EV_KEY BTN_TR", 6, 0x80 },
14 { "EV_KEY BTN_TOP2", 7, 0x04 },
15 { "EV_KEY BTN_TOP", 7, 0x08 },
18 static const ValLoc vallocs[]= {
19 { "EV_ABS ABS_X", 1,0,+1, 0xff, 0x80 },
20 { "EV_ABS ABS_Y", 2,0,-1, 0xff, 0x80 },
21 { "EV_ABS ABS_RUDDER", 3,0,+1, 0xff, 0x80 },
22 { "EV_ABS ABS_THROTTLE", 4,0,-1, 0xff, 0x80 },
23 // { "EV_ABS DPAD", 5,0,+1, 0x0f, 0x00 },
27 static void pr(uint8_t msg[MAXREPORTLEN], int msglen,
28 const uint8_t last[MAXREPORTLEN]) {
29 reportbits(msg, last, msglen, keybits);
30 reportlocs(msg, last, msglen, vallocs);
33 const char *progname= "hidrawconv-joytechneos";
35 const char *const descriptor=
36 "05010904a101854a0901a1000501093009311580257f350045ff660000750895028102c0050209ba150026ff00750895018102050209bb150026ff007508950181020501093915012508360000463b016514750895018102950c7501050945013500150025011901290c810295040605ff09018102c005140924a101854d150026ff000931750895079182c005010906a101854b050719e029e71500250175019508810295017508810195057501050819012905910295017503910195057508150025680507190029688100c0";
38 ProcessReport *const report_processors[MAXREPORTS]= {