VSF Documented
input.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_INPUT_H__
2#define __VSF_LINUX_INPUT_H__
3
5
6#if VSF_USE_INPUT == ENABLED
7
8#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
9# include "./sys/types.h"
10# include "./sys/time.h"
11# include "./sys/ioctl.h"
12#else
13# include <sys/types.h>
14# include <sys/time.h>
15# include <sys/ioctl.h>
16#endif
17#include <linux/types.h>
18#include <linux/device.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len)
26#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len)
27#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len)
28#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len)
29#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len)
30#define EVIOCGBIT(ev, len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len)
31#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo)
32#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo)
33#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect))
34#define EVIOCRMFF _IOW('E', 0x81, int)
35#define EVIOCGEFFECTS _IOR('E', 0x84, int)
36#define EVIOCGRAB _IOW('E', 0x90, int)
37#define EVIOCREVOKE _IOW('E', 0x91, int)
38#define EVIOCSCLOCKID _IOW('E', 0xa0, int)
39#define EVIOCGVERSION _IOR('E', 0x01, int)
40#define EVIOCGID _IOR('E', 0x02, struct input_id)
41#define EVIOCGREP _IOR('E', 0x03, unsigned int[2])
42#define EVIOCSREP _IOW('E', 0x03, unsigned int[2])
43#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2])
44#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
45#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2])
46#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)
47#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len)
48#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len)
49#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len)
50#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len)
51
52#define EV_VERSION 0x010001
53
54#define BUS_PCI 0x01
55#define BUS_USB 0x03
56#define BUS_BLUETOOTH 0x05
57#define BUS_VIRTUAL 0x06
58
59// event types
60
61#define EV_SYN VSF_INPUT_TYPE_SYNC
62#define EV_KEY VSF_INPUT_TYPE_KEYBOARD
63#define EV_REL 0x10
64#define EV_ABS 0x11
65#define EV_MSC 0x12
66#define EV_SW 0x13
67#define EV_LED 0x14
68#define EV_SND 0x15
69#define EV_REP 0x16
70#define EV_FF 0x17
71#define EV_PWR 0x18
72#define EV_FF_STATUS 0x19
73#define EV_MAX 0x1F
74#define EV_CNT (EV_MAX + 1)
75
76#define SYN_REPORT 0
77#define SYN_CONFIG 1
78#define SYN_MT_REPORT 2
79#define SYN_DROPPED 3
80#define SYN_MAX 0xf
81#define SYN_CNT (SYN_MAX + 1)
82
83// event codes
84// VSF_INPUT_TYPE_SYNC
85
86#define SYN_REPORT 0
87
88// VSF_INPUT_TYPE_KEYBOARD
89
90#define KEY_RESERVED VSF_KB_UNKNOWN
91#define KEY_ESC VSF_KB_ESCAPE
92#define KEY_1 VSF_KB_1
93#define KEY_2 VSF_KB_2
94#define KEY_3 VSF_KB_3
95#define KEY_4 VSF_KB_4
96#define KEY_5 VSF_KB_5
97#define KEY_6 VSF_KB_6
98#define KEY_7 VSF_KB_7
99#define KEY_8 VSF_KB_8
100#define KEY_9 VSF_KB_9
101#define KEY_0 VSF_KB_0
102#define KEY_A VSF_KB_a
103#define KEY_B VSF_KB_b
104#define KEY_C VSF_KB_c
105#define KEY_D VSF_KB_d
106#define KEY_E VSF_KB_e
107#define KEY_F VSF_KB_f
108#define KEY_G VSF_KB_g
109#define KEY_H VSF_KB_h
110#define KEY_I VSF_KB_i
111#define KEY_J VSF_KB_j
112#define KEY_K VSF_KB_k
113#define KEY_L VSF_KB_l
114#define KEY_M VSF_KB_m
115#define KEY_N VSF_KB_n
116#define KEY_O VSF_KB_o
117#define KEY_P VSF_KB_p
118#define KEY_Q VSF_KB_q
119#define KEY_R VSF_KB_r
120#define KEY_S VSF_KB_s
121#define KEY_T VSF_KB_t
122#define KEY_U VSF_KB_u
123#define KEY_V VSF_KB_v
124#define KEY_W VSF_KB_w
125#define KEY_X VSF_KB_x
126#define KEY_Y VSF_KB_y
127#define KEY_Z VSF_KB_z
128#define KEY_MINUS VSF_KB_MINUS
129#define KEY_EQUAL VSF_KB_EQUAL
130#define KEY_BACKSPACE VSF_KB_BACKSPACE
131#define KEY_TAB VSF_KB_TAB
132#define KEY_LEFTBRACE VSF_KB_LEFT_BRACE
133#define KEY_RIGHTBRACE VSF_KB_RIGHT_BRACE
134#define KEY_ENTER VSF_KB_ENTER
135#define KEY_SEMICOLON VSF_KB_SEMICOLON
136#define KEY_APOSTROPHE VSF_KB_SINGLE_QUOTE
137#define KEY_GRAVE VSF_KB_GRAVE
138#define KEY_BACKSLASH VSF_KB_BACKSLASH
139#define KEY_COMMA VSF_KB_COMMA
140#define KEY_DOT VSF_KB_DOT
141#define KEY_SLASH VSF_KB_SLASH
142#define KEY_SPACE VSF_KB_SPACE
143#define KEY_CAPSLOCK VSF_KB_CAPSLOCK
144#define KEY_NUMLOCK VSF_KP_NUMLOCK
145#define KEY_SCROLLLOCK VSF_KB_SCROLLLOCK
146#define KEY_F1 VSF_KB_F1
147#define KEY_F2 VSF_KB_F2
148#define KEY_F3 VSF_KB_F3
149#define KEY_F4 VSF_KB_F4
150#define KEY_F5 VSF_KB_F5
151#define KEY_F6 VSF_KB_F6
152#define KEY_F7 VSF_KB_F7
153#define KEY_F8 VSF_KB_F8
154#define KEY_F9 VSF_KB_F9
155#define KEY_F10 VSF_KB_F10
156#define KEY_F11 VSF_KB_F11
157#define KEY_F12 VSF_KB_F12
158#define KEY_F13 VSF_KB_F13
159#define KEY_F14 VSF_KB_F14
160#define KEY_F15 VSF_KB_F15
161#define KEY_F16 VSF_KB_F16
162#define KEY_F17 VSF_KB_F17
163#define KEY_F18 VSF_KB_F18
164#define KEY_F19 VSF_KB_F19
165#define KEY_F20 VSF_KB_F20
166#define KEY_F21 VSF_KB_F21
167#define KEY_F22 VSF_KB_F22
168#define KEY_F23 VSF_KB_F23
169#define KEY_F24 VSF_KB_F24
170#define KEY_LEFTCTRL VSF_KB_LCTRL
171#define KEY_LEFTSHIFT VSF_KB_LSHIFT
172#define KEY_LEFTALT VSF_KB_LALT
173#define KEY_LEFTMETA VSF_KB_LGUI
174#define KEY_RIGHTCTRL VSF_KB_RCTRL
175#define KEY_RIGHTSHIFT VSF_KB_RSHIFT
176#define KEY_RIGHTALT VSF_KB_RALT
177#define KEY_RIGHTMETA VSF_KB_RGUI
178#define KEY_HOME VSF_KB_HOME
179#define KEY_UP VSF_KB_UP
180#define KEY_DOWN VSF_KB_DOWN
181#define KEY_LEFT VSF_KB_LEFT
182#define KEY_RIGHT VSF_KB_RIGHT
183#define KEY_PAGEUP VSF_KB_PAGE_UP
184#define KEY_PAGEDOWN VSF_KB_PAGE_DOWN
185#define KEY_INSERT VSF_KB_INSERT
186#define KEY_DELETE VSF_KB_DELETE
187#define KEY_END VSF_KB_END
188#define KEY_MUTE VSF_KB_MUTE
189#define KEY_VOLUMEUP VSF_KB_VOLUMEUP
190#define KEY_VOLUMEDOWN VSF_KB_VOLUMEDOWN
191#define KEY_POWER VSF_KB_POWER
192#define KEY_PAUSE VSF_KB_PAUSE
193#define KEY_STOP VSF_KB_STOP
194#define KEY_AGAIN VSF_KB_AGAIN
195#define KEY_UNDO VSF_KB_UNDO
196#define KEY_COPY VSF_KB_COPY
197#define KEY_PASTE VSF_KB_PASTE
198#define KEY_CUT VSF_KB_CUT
199#define KEY_FIND VSF_KB_FIND
200#define KEY_HELP VSF_KB_HELP
201#define KEY_MENU VSF_KB_MENU
202#define KEY_SLEEP VSF_KB_SLEEP
203
204#define KEY_KP1 VSF_KP_1
205#define KEY_KP2 VSF_KP_2
206#define KEY_KP3 VSF_KP_3
207#define KEY_KP4 VSF_KP_4
208#define KEY_KP5 VSF_KP_5
209#define KEY_KP6 VSF_KP_6
210#define KEY_KP7 VSF_KP_7
211#define KEY_KP8 VSF_KP_8
212#define KEY_KP9 VSF_KP_9
213#define KEY_KP0 VSF_KP_0
214#define KEY_KPASTERISK VSF_KP_ASTERISK
215#define KEY_KPMINUS VSF_KP_MINUS
216#define KEY_KPPLUS VSF_KP_PLUS
217#define KEY_KPDOT VSF_KP_DOT
218#define KEY_KPEQUAL VSF_KP_EQUAL
219#define KEY_KPCOMMA VSF_KP_COMMA
220#define KEY_KPENTER VSF_KP_ENTER
221#define KEY_KPSLASH VSF_KP_SLASH
222
223#define KEY_RECORD (VSF_KB_USER + 1)
224#define KEY_SETUP (VSF_KB_USER + 2)
225#define KEY_REWIND (VSF_KB_USER + 3)
226#define KEY_PLAYPAUSE (VSF_KB_USER + 4)
227#define KEY_PLAY (VSF_KB_USER + 5)
228#define KEY_FASTFORWARD (VSF_KB_USER + 6)
229#define KEY_CANCEL (VSF_KB_USER + 7)
230#define KEY_SELECT (VSF_KB_USER + 8)
231#define KEY_CLEAR (VSF_KB_USER + 9)
232#define KEY_EXIT (VSF_KB_USER + 10)
233#define KEY_INFO (VSF_KB_USER + 11)
234#define KEY_PROGRAM (VSF_KB_USER + 12)
235#define KEY_CALENDAR (VSF_KB_USER + 13)
236#define KEY_RED (VSF_KB_USER + 14)
237#define KEY_GREEN (VSF_KB_USER + 15)
238#define KEY_YELLOW (VSF_KB_USER + 16)
239#define KEY_BLUE (VSF_KB_USER + 17)
240#define KEY_CHANNELUP (VSF_KB_USER + 18)
241#define KEY_CHANNELDOWN (VSF_KB_USER + 19)
242
243#define KEY_MAX 0x3ff
244#define KEY_CNT (KEY_MAX + 1)
245
246// rel
247
248#define REL_X 0x00
249#define REL_Y 0x01
250#define REL_Z 0x02
251#define REL_RX 0x03
252#define REL_RY 0x04
253#define REL_RZ 0x05
254#define REL_HWHEEL 0x06
255#define REL_DIAL 0x07
256#define REL_WHEEL 0x08
257#define REL_MISC 0x09
258
259#define REL_MAX 0x0f
260#define REL_CNT (REL_MAX + 1)
261
262// btn
263
264#define BTN_GAMEPAD 0x400
265#define BTN_SOUTH (BTN_GAMEPAD | GAMEPAD_ID_R_DOWN)
266#define BTN_A BTN_SOUTH
267#define BTN_EAST (BTN_GAMEPAD | GAMEPAD_ID_R_RIGHT)
268#define BTN_B BTN_EAST
269#define BTN_NORTH (BTN_GAMEPAD | GAMEPAD_ID_R_UP)
270#define BTN_X BTN_NORTH
271#define BTN_WEST (BTN_GAMEPAD | GAMEPAD_ID_R_LEFT)
272#define BTN_Y BTN_WEST
273#define BTN_TL (BTN_GAMEPAD | GAMEPAD_ID_LT)
274#define BTN_TR (BTN_GAMEPAD | GAMEPAD_ID_RT)
275#define BTN_SELECT (BTN_GAMEPAD | GAMEPAD_ID_MENU_LEFT)
276#define BTN_MODE (BTN_GAMEPAD | GAMEPAD_ID_MENU_MAIN)
277#define BTN_START (BTN_GAMEPAD | GAMEPAD_ID_MENU_RIGHT)
278#define BTN_THUMBL (BTN_GAMEPAD | GAMEPAD_ID_L_STICK)
279#define BTN_THUMBR (BTN_GAMEPAD | GAMEPAD_ID_R_STICK)
280#define BTN_TRIGGER_HAPPY (BTN_GAMEPAD | (GAMEPAD_ID_USER + 0))
281#define BTN_TRIGGER_HAPPY1 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 0))
282#define BTN_TRIGGER_HAPPY2 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 1))
283#define BTN_TRIGGER_HAPPY3 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 2))
284#define BTN_TRIGGER_HAPPY4 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 3))
285#define BTN_TRIGGER_HAPPY5 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 4))
286#define BTN_TRIGGER_HAPPY6 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 5))
287#define BTN_TRIGGER_HAPPY7 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 6))
288#define BTN_TRIGGER_HAPPY8 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 7))
289#define BTN_TRIGGER_HAPPY9 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 8))
290#define BTN_TRIGGER_HAPPY10 (BTN_GAMEPAD | (GAMEPAD_ID_USER + 9))
291#define BTN_GAMEPAD_MAX BTN_TRIGGER_HAPPY10
292
293#define BTN_MOUSE 0x420
294#define BTN_LEFT (BTN_MOUSE + VSF_INPUT_MOUSE_BUTTON_LEFT)
295#define BTN_RIGHT (BTN_MOUSE + VSF_INPUT_MOUSE_BUTTON_RIGHT)
296#define BTN_MIDDLE (BTN_MOUSE + VSF_INPUT_MOUSE_BUTTON_MIDDLE)
297#define BTN_MOUSE_MAX 0x422
298
299#define BTN_JOYSTICK 0x430
300#define BTN_TRIGGER BTN_JOYSTICK
301
302#define BTN_DIGI 0x440
303#define BTN_TOOL_PEN 0x440
304#define BTN_TOOL_FINGER 0x445
305#define BTN_TOUCH 0x44a
306#define BTN_STYLUS 0x44b
307
308// abs
309
310#define ABS_X 0x00
311#define ABS_Y 0x01
312#define ABS_Z 0x02
313#define ABS_RX 0x03
314#define ABS_RY 0x04
315#define ABS_RZ 0x05
316#define ABS_THROTTLE 0x06
317#define ABS_RUDDER 0x07
318#define ABS_WHEEL 0x08
319#define ABS_GAS 0x09
320#define ABS_BRAKE 0x0a
321#define ABS_HAT0X 0x10
322#define ABS_HAT0Y 0x11
323#define ABS_HAT1X 0x12
324#define ABS_HAT1Y 0x13
325#define ABS_HAT2X 0x14
326#define ABS_HAT2Y 0x15
327#define ABS_HAT3X 0x16
328#define ABS_HAT3Y 0x17
329#define ABS_PRESSURE 0x18
330#define ABS_DISTANCE 0x19
331#define ABS_TILT_X 0x1a
332#define ABS_TILT_Y 0x1b
333#define ABS_TOOL_WIDTH 0x1c
334#define ABS_VOLUME 0x20
335#define ABS_MISC 0x28
336
337#define ABS_MT_POSITION_X 0x35
338#define ABS_MT_POSITION_Y 0x36
339#define ABS_MT_TRACKING_ID 0x39
340#define ABS_MT_PRESSURE 0x3a
341
342#define ABS_MAX 0x3f
343#define ABS_CNT (ABS_MAX + 1)
344
345// LED
346
347#define LED_NUML 0x00
348#define LED_CAPSL 0x01
349#define LED_SCROLLL 0x02
350#define LED_COMPOSE 0x03
351#define LED_KANA 0x04
352#define LED_SLEEP 0x05
353#define LED_SUSPEND 0x06
354#define LED_MUTE 0x07
355#define LED_MISC 0x08
356#define LED_MAIL 0x09
357#define LED_CHARGING 0x0a
358#define LED_MAX 0x0f
359#define LED_CNT (LED_MAX + 1)
360
361// msc
362
363#define MSC_SERIAL 0x00
364#define MSC_PULSELED 0x01
365#define MSC_GESTURE 0x02
366#define MSC_RAW 0x03
367#define MSC_SCAN 0x04
368#define MSC_TIMESTAMP 0x05
369#define MSC_MAX 0x07
370#define MSC_CNT (MSC_MAX + 1)
371
379};
380
382 struct timeval time;
383#define input_event_sec time.tv_sec
384#define input_event_usec time.tv_usec
385
389};
390
391struct input_id {
396};
397
398dcl_vsf_bitmap(input_dev_bitmap, 0x450)
399struct input_dev {
400 const char *name;
401 const char *phys;
402 const char *uniq;
403 struct input_id id;
404
405 struct device dev;
407
408 uint64_t abs_msk;
409 uint64_t rel_msk;
410 struct input_absinfo *absinfo;
411 int rel_value[REL_CNT];
412
413 vsf_bitmap(input_dev_bitmap) key_bitmap;
414};
415#define to_input_dev(__dev) vsf_container_of((__dev), struct input_dev, dev)
416
421};
422
423struct input_handle;
425 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
426 void (*events)(struct input_handle *handle, const struct input_value *vals, unsigned int count);
427 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
428 bool (*match)(struct input_handler *handler, struct input_dev *dev);
429// int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
430 void (*disconnect)(struct input_handle *handle);
431 void (*start)(struct input_handle *handle);
432
433 const char *name;
434};
436 const char *name;
437 struct input_dev *dev;
439};
440
441// force feedback
442struct ff_replay {
445};
449};
455};
459};
464};
472};
482};
486};
487struct ff_effect {
493
494 union {
495 struct ff_constant_effect constant;
496 struct ff_ramp_effect ramp;
497 struct ff_periodic_effect periodic;
498 struct ff_condition_effect condition[2]; // x/y
499 struct ff_rumble_effect rumble;
500 } u;
501};
502#define FF_RUMBLE 0x50
503#define FF_PERIODIC 0x51
504#define FF_CONSTANT 0x52
505#define FF_SPRING 0x53
506#define FF_FRICTION 0x54
507#define FF_DAMPER 0x55
508#define FF_INERTIA 0x56
509#define FF_RAMP 0x57
510#define FF_EFFECT_MIN FF_RUMBLE
511#define FF_EFFECT_MAX FF_RAMP
512
513#define FF_SQUARE 0x58
514#define FF_TRIANGLE 0x59
515#define FF_SINE 0x5a
516#define FF_SAW_UP 0x5b
517#define FF_SAW_DOWN 0x5c
518#define FF_CUSTOM 0x5d
519#define FF_WAVEFORM_MIN FF_SQUARE
520#define FF_WAVEFORM_MAX FF_CUSTOM
521
522#define FF_GAIN 0x60
523#define FF_AUTOCENTER 0x61
524
525#define FF_MAX_EFFECTS FF_GAIN
526#define FF_MAX 0x7f
527#define FF_CNT (FF_MAX + 1)
528
529extern int input_ff_create(struct input_dev *dev, unsigned int max_effects);
530extern void input_ff_destroy(struct input_dev *dev);
531extern int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
532//extern int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
533//extern int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
534//extern int input_ff_flush(struct input_dev *dev, struct file *file);
535extern int input_ff_create_memless(struct input_dev *dev, void *data, int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
536
537extern struct input_dev * input_allocate_device(void);
538extern struct input_dev * devm_input_allocate_device(struct device *);
539extern void input_free_device(struct input_dev *dev);
540
541static inline struct input_dev * input_get_device(struct input_dev *dev)
542{
543 return dev ? to_input_dev(get_device(&dev->dev)) : NULL;
544}
545
546static inline void input_put_device(struct input_dev *dev)
547{
548 if (dev) {
549 put_device(&dev->dev);
550 }
551}
552
553static inline void * input_get_drvdata(struct input_dev *dev)
554{
555 return dev_get_drvdata(&dev->dev);
556}
557
558static inline void input_set_drvdata(struct input_dev *dev, void *data)
559{
560 dev_set_drvdata(&dev->dev, data);
561}
562
563extern int input_register_device(struct input_dev *dev);
564extern void input_unregister_device(struct input_dev *dev);
565
566extern void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
567extern void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
568
569static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
570{
571 input_event(dev, EV_KEY, code, !!value);
572}
573
574static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value)
575{
576 input_event(dev, EV_REL, code, value);
577}
578
579static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value)
580{
581 input_event(dev, EV_ABS, code, value);
582}
583
584static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value)
585{
586 input_event(dev, EV_FF_STATUS, code, value);
587}
588
589static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value)
590{
591 input_event(dev, EV_SW, code, !!value);
592}
593
594static inline void input_sync(struct input_dev *dev)
595{
596 input_event(dev, EV_SYN, SYN_REPORT, 0);
597}
598
599static inline void input_mt_sync(struct input_dev *dev)
600{
602}
603
604extern void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
605
606extern void input_alloc_absinfo(struct input_dev *dev);
607extern void input_set_abs_params(struct input_dev *dev, unsigned int axis, int min, int max, int fuzz, int flat);
608extern void input_copy_abs(struct input_dev *dst, unsigned int dst_axis, const struct input_dev *src, unsigned int src_axis);
609
610#ifdef __cplusplus
611}
612#endif
613
614#endif // VSF_USE_INPUT
615#endif // __VSF_LINUX_INPUT_H__
bool
Definition type.h:60
Definition vsf_input.h:114
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
void input_copy_abs(struct input_dev *dst, unsigned int dst_axis, const struct input_dev *src, unsigned int src_axis)
Definition vsf_linux_core_input.c:284
void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
#define SYN_REPORT
Definition input.h:76
void input_unregister_device(struct input_dev *dev)
Definition vsf_linux_core_input.c:82
#define EV_REL
Definition input.h:63
#define SYN_MT_REPORT
Definition input.h:78
int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
Definition vsf_linux_core_input.c:297
#define REL_CNT
Definition input.h:260
#define EV_SW
Definition input.h:66
#define to_input_dev(__dev)
Definition input.h:415
void input_alloc_absinfo(struct input_dev *dev)
Definition vsf_linux_core_input.c:257
void input_set_abs_params(struct input_dev *dev, unsigned int axis, int min, int max, int fuzz, int flat)
Definition vsf_linux_core_input.c:266
int input_register_device(struct input_dev *dev)
Definition vsf_linux_core_input.c:70
#define EV_ABS
Definition input.h:64
void input_ff_destroy(struct input_dev *dev)
Definition vsf_linux_core_input.c:293
int input_ff_create(struct input_dev *dev, unsigned int max_effects)
Definition vsf_linux_core_input.c:288
void input_free_device(struct input_dev *dev)
Definition vsf_linux_core_input.c:59
#define EV_KEY
Definition input.h:62
int input_ff_create_memless(struct input_dev *dev, void *data, int(*play_effect)(struct input_dev *, void *, struct ff_effect *))
Definition vsf_linux_core_input.c:302
struct input_dev * devm_input_allocate_device(struct device *)
Definition vsf_linux_core_input.c:50
void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code)
Definition vsf_linux_core_input.c:86
#define EV_SYN
Definition input.h:61
#define EV_FF_STATUS
Definition input.h:72
struct input_dev * input_allocate_device(void)
Definition vsf_linux_core_input.c:39
int32_t __s32
Definition types.h:54
uint32_t __u32
Definition types.h:55
int16_t __s16
Definition types.h:52
uint16_t __u16
Definition types.h:53
#define NULL
Definition lvgl.h:26
#define min(x, y)
Definition minmax.h:11
#define max(x, y)
Definition minmax.h:12
void put_device(struct device *dev)
Definition vsf_linux_core.c:546
struct device * get_device(struct device *dev)
Definition vsf_linux_core.c:538
unsigned short uint16_t
Definition stdint.h:7
int int32_t
Definition stdint.h:8
unsigned long long uint64_t
Definition stdint.h:11
Definition device.h:33
Definition input.h:465
__u16 left_saturation
Definition input.h:467
__s16 center
Definition input.h:471
__u16 deadband
Definition input.h:470
__u16 right_saturation
Definition input.h:466
__s16 right_coeff
Definition input.h:468
__s16 left_coeff
Definition input.h:469
Definition input.h:456
struct ff_envelope envelope
Definition input.h:458
__s16 level
Definition input.h:457
Definition input.h:487
__u16 type
Definition input.h:488
__s16 id
Definition input.h:489
__u16 direction
Definition input.h:490
struct ff_trigger trigger
Definition input.h:491
struct ff_replay replay
Definition input.h:492
union ff_effect::@1040 u
Definition input.h:450
__u16 fade_level
Definition input.h:454
__u16 attack_level
Definition input.h:452
__u16 attack_length
Definition input.h:451
__u16 fade_length
Definition input.h:453
Definition input.h:473
__s16 * custom_data
Definition input.h:481
__s16 offset
Definition input.h:477
__u32 custom_len
Definition input.h:480
struct ff_envelope envelope
Definition input.h:479
__u16 waveform
Definition input.h:474
__u16 phase
Definition input.h:478
__s16 magnitude
Definition input.h:476
__u16 period
Definition input.h:475
Definition input.h:460
__s16 end_level
Definition input.h:462
__s16 start_level
Definition input.h:461
struct ff_envelope envelope
Definition input.h:463
Definition input.h:442
__u16 length
Definition input.h:443
__u16 delay
Definition input.h:444
Definition input.h:483
__u16 weak_magnitude
Definition input.h:485
__u16 strong_magnitude
Definition input.h:484
Definition input.h:446
__u16 interval
Definition input.h:448
__u16 button
Definition input.h:447
Definition input.h:372
__s32 flat
Definition input.h:377
__s32 fuzz
Definition input.h:376
__s32 resolution
Definition input.h:378
__s32 maximum
Definition input.h:375
__s32 minimum
Definition input.h:374
__s32 value
Definition input.h:373
Definition input.h:381
struct timeval time
Definition input.h:382
uint16_t code
Definition input.h:387
uint16_t type
Definition input.h:386
int32_t value
Definition input.h:388
Definition input.h:435
struct input_dev * dev
Definition input.h:437
struct input_handler * handler
Definition input.h:438
const char * name
Definition input.h:436
Definition input.h:424
bool(* match)(struct input_handler *handler, struct input_dev *dev)
Definition input.h:428
void(* start)(struct input_handle *handle)
Definition input.h:431
void(* events)(struct input_handle *handle, const struct input_value *vals, unsigned int count)
Definition input.h:426
void(* event)(struct input_handle *handle, unsigned int type, unsigned int code, int value)
Definition input.h:425
bool(* filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value)
Definition input.h:427
const char * name
Definition input.h:433
void(* disconnect)(struct input_handle *handle)
Definition input.h:430
Definition input.h:391
__u16 bustype
Definition input.h:392
__u16 product
Definition input.h:394
__u16 version
Definition input.h:395
__u16 vendor
Definition input.h:393
Definition input.h:417
__u16 code
Definition input.h:419
__u16 type
Definition input.h:418
__s32 value
Definition input.h:420
Definition time.h:42
vk_av_control_value_t value
Definition vsf_audio.h:171
vk_av_control_type_t type
Definition vsf_audio.h:170
#define dcl_vsf_bitmap(__name, __bit_size)
Definition vsf_bitmap.h:98
#define vsf_bitmap(__name)
Definition vsf_bitmap.h:93
vk_input_notifier_t notifier
Definition vsf_xboot.c:31
Generated from commit: vsfteam/vsf@8ae15ee