먼가 uinput 에서 사용하던 함수 같은 느낌의 코드가 보여서 찾아보는 중
| input_event(input, EV_ABS, ABS_MT_POSITION_X, *slot->x); input_event(input, EV_ABS, ABS_MT_POSITION_Y, *slot->y); input_event(input, EV_ABS, ABS_MT_TOOL_X, *slot->cx); input_event(input, EV_ABS, ABS_MT_TOOL_Y, *slot->cy); input_event(input, EV_ABS, ABS_MT_DISTANCE, !*slot->tip_state); input_event(input, EV_ABS, ABS_MT_ORIENTATION, orientation); input_event(input, EV_ABS, ABS_MT_PRESSURE, *slot->p); input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, major); input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, minor); |
| void input_event(struct input_dev * dev, unsigned int type, unsigned int code, int value) report new input event Parameters struct input_dev * devdevice that generated the eventunsigned int typetype of the eventunsigned int codeevent codeint valuevalue of the event Description This function should be used by drivers implementing various input devices to report input events. See also input_inject_event(). NOTE input_event() may be safely used right after input device was allocated with input_allocate_device(), even before it is registered with input_register_device(), but the event will not reach any of the input handlers. Such early invocation of input_event() may be used to ‘seed’ initial state of a switch or initial position of absolute axis, etc. |
[링크 : https://www.kernel.org/doc/html/v4.14/driver-api/input.html#c.input_event]
'Linux API > linux' 카테고리의 다른 글
| linux 시리얼 포트 열기(termios) (0) | 2025.10.11 |
|---|---|
| LD_DEBUG=libs (0) | 2025.06.02 |
| linux device tree(dtb) 문법...? (0) | 2024.12.04 |
| usb hid, hidraw (0) | 2024.03.11 |
| linux 멀티터치 프로토콜 (0) | 2024.03.08 |
