驱动应该显式地发送BTN_TOOL_*TAP事件,并在调用input_mt_report_pointer_emulation()时把use_count參数设为false。驱动应该仅仅通告硬件所能报告的slots数量。用户空间能够通过注意到最大支持的BTN_TOOL_*TAP事件大于在ABS_MT_SLOT轴的absinfo中报告的type B的slots总数,来检測驱动能否报告比slots数还多的触控点。
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_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(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); ... ...
A协议不会使用slot。多指处理中,它的报点序列例如以下(每一个序列都以input_report_***函数实现): 点击(此处)折叠或打开 ABS_MT_POSITION_X x[0] ABS_MT_POSITION_Y y[0] SYN_MT_REPORT ABS_MT_POSITION_X x[1] ABS_MT_POSITION_Y y[1] ...
对于type A设备的驱动,在每个数据包的结尾用input_mt_sync()对多个触控包进行分割,这将会产生一个SYN_MT_REPORT事件,它通知接收者接受当前的触控信息并准备接收下一个信息。 对于type B设备的驱动,在每个数据包的开始,通过调用input_mt_slot()进行分割,同时带入一个参数:slot。这会产生一个ABS_MT_SLOT事件,它...
对于type A设备的驱动,在每个数据包的结尾用input_mt_sync()对多个触控包进行分割,这将会产生一个SYN_MT_REPORT事件,它通知接收者接受当前的触控信息并准备接收下一个信息。 对于type B设备的驱动,在每个数据包的开始,通过调用input_mt_slot()进行分割,同时带入一个参数:slot。这会产生一个ABS_MT_SLOT事件,它...
(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: ...
if (classes & INPUT_DEVICE_CLASS_CURSOR) { device->addMapper(new CursorInputMapper(device)); } // 看classes添加单指、多指触碰的Mapper if (classes & INPUT_DEVICE_CLASS_TOUCH_MT) { device->addMapper(new MultiTouchInputMapper(device)); } else if (classes & INPUT_DEVICE_CLASS_TOUCH) { devi...
input_mt_slot(ts->input, id); input_report_abs(ts->input, ABS_MT_TRACKING_ID, id); input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR,1); input_report_abs(ts->input, ABS_MT_POSITION_X, x); input_report_abs(ts->input, ABS_MT_POSITION_Y, y); ...