MT(Multi-Touch) Protocol (2)

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更多的接觸。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章