Protocol Example A
------------------
A类协议例子
Here is what a minimal event sequence for a two-contact touch would look
like for a type A device:
A类设备两点触摸的最简单事件序列:
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]
SYN_MT_REPORT //通知接收器接受当前接触数据和准备接受下一个接触数据
SYN_REPORT //标记一次多点触摸传输的结束
The sequence after moving one of the contacts looks exactly the same; the
raw data for all present contacts are sent between every synchronization
with SYN_REPORT.
传输接触数据的序列看起来确切是相同的;所有当前接触的原始数据在两个SYN_REPORT之间被传送。
Here is the sequence after lifting the first contact:
释放第一个接触的序列:
ABS_MT_POSITION_X x[1]
ABS_MT_POSITION_Y y[1]
SYN_MT_REPORT
SYN_REPORT
And here is the sequence after lifting the second contact:
释放第二个接触的序列:
SYN_MT_REPORT
SYN_REPORT
If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the
ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the
last SYN_REPORT will be dropped by the input core, resulting in no zero-contact event reaching userland.
如果驱动程序报告除ABS_MT事件之外的BTN_TOUCH和ABS_PRESSURE中的一个,最后的SYN_MT_REPORT事件也许需要被删除。否则,最后一个SYN_REPORT报告将要被input核心丢弃,从而导致没有zero-contact事件到达用户空间。