MT(Multi-Touch) Protocol (3)

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事件到达用户空间。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值