在每一个数据包的结尾用input_mt_sync()对多个触控包进行切割,这将会产生一个SYN_MT_REPORT事件,它通知接收者接受当前的触控信息并准备接收下一个信息。 对于type B设备的驱动,在每一个数据包的開始,通过调用input_mt_slot()进行切割。同一时候带入一个參数:slot。这会产生一个ABS_MT_SLOT事件。它通知接收者...
input_mt_report_slot_state(input, MT_TOOL_FINGER, act); ...//5. 上报数据, ABS即坐标的绝对值 input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); ... input_mt_sync_frame(input); input_sync(input); ... } //2. probe函数, 当设备与...
input_mt_slot(ts->input_dev, id); input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id); input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x); input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y); input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w); input_repo...
input_mt_slot(input, id); input_mt_report_slot_state(input, MT_TOOL_FINGER, act); ...//5. 上报数据, ABS即坐标的绝对值 input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); ... input_mt_sync_frame(input); input_sync(input); ... ...
input_mt_slot(ts->input_dev, id); input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id); input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x); input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y); input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w); ...
struct input_mt_slot *mt; int mtsize; int slot; int trkid; struct input_absinfo *absinfo; unsigned long key[BITS_TO_LONGS(KEY_CNT)]; unsigned long led[BITS_TO_LONGS(LED_CNT)]; unsigned long snd[BITS_TO_LONGS(SND_CNT)];
InputReader接收到事件后,会交给InputMapper处理。对于触摸设备,多点触摸的设备由MultiTouchInputMapper负责,而单点触摸则由SingleTouchInputMapper处理。以滑动手指为例,驱动首先上报坐标信息和同步事件。MultiTouchInputMapper处理过程包括收集触摸事件信息,如ABS_MT_SLOT(表示手指槽位)、ABS_MT_TRACKING_ID(...
v->value = dev->mt->slot; }/* 缓存event事件 */ v = &dev->vals[dev->num_vals++]; v->type = type; v->code = code; v->value = value; } /* 向上层handler汇报事件,刷新缓冲区,上报event事件 */ if (disposition & INPUT_FLUSH) { if (dev->num_vals >= 2) input_pass_values(...
timer_list timer;/*用于软件自动重复按键的定时器*/3536intrep[REP_CNT];3738structinput_mt_slot *mt;39intmtsize;40intslot;41inttrkid;4243structinput_absinfo *absinfo;4445unsignedlongkey[BITS_TO_LONGS(KEY_CNT)];//反映设备按键按钮的当前状态46unsignedlongled[BITS_TO_LONGS(LED_CNT)];//反映...
(ABS_MT_SLOT)Value0Min0Max4Event code48(ABS_MT_TOUCH_MAJOR)Value0Min0Max255Event code50(ABS_MT_WIDTH_MAJOR)Value0Min0Max255Event code53(ABS_MT_POSITION_X)Value0Min0Max719Event code54(ABS_MT_POSITION_Y)Value0Min0Max1279Event code57(ABS_MT_TRACKING_ID)Value0Min0Max65535Properties: ...