MT(Multi-Touch) Protocol (2)

来源:互联网 发布:js 时间戳定义 编辑:程序博客网 时间:2024/06/05 05:17

Some devices identify and/or track more contacts than they can report to the
driver.  A driver for such a device should associate one type B slot with each
contact that is reported by the hardware. 
一些设备可以识别或跟踪的接触比他们可以报告给驱动程序的接触更多。此类设备的驱动程序应该为每一个由硬件报告的接触关联一个B类型的slot。

 

Whenever the identity of the contact associated with a slot changes, the driver
should invalidate that slot by changing its ABS_MT_TRACKING_ID.  If the hardware
signals that it is tracking more contacts than it is currently reporting, the driver should use a BTN_TOOL_*TAP event to inform userspace of the total number of contacts being tracked by the hardware at that moment. 
只要关联到slot上的接触的标志改变,驱动程序就应该通过改变接触ABS_MT_TRACKING_ID来销毁此接触。如果硬件显示它正在跟踪的接触比当前正在报告的接触更多,驱动程序应该使用一个BTN_TOOL_*TAP事件去通知用户空间暂时所有的接触正在被硬件跟踪。

 

The driver should do this by explicitly sending the corresponding BTN_TOOL_*TAP
event and setting use_count to false when calling input_mt_report_pointer_emulation().The driver should only advertise as many slots as the hardware can report.
Userspace can detect that a driver can report more total contacts than slots
by noting that the largest supported BTN_TOOL_*TAP event is larger than the
total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis.
当调用input_mt_report_pointer_emulation()函数时,驱动程序应该明确地发送相应的BTN_TOOL_*TAP事件和设置use_count为false。驱动程序应该只通知硬件可以报告的slot。用户空间可以检测到如下情况:
驱动程序可以通过指出最大支持的BTN_TOOL_*TAP事件比ABS_MT_SLOT轴的absinfo中报告的B类slot的总数还多来报告比slot更多的接触。

原创粉丝点击