设为首页 加入收藏

TOP

Linux/Android 多点触摸支持
2014-11-24 08:14:57 来源: 作者: 【 】 浏览:1
Tags:Linux/Android 触摸 支持

整个处理过程就是:touch screen-->drivers-->input subsystem-->evdev-->user space。由于touchscreen的不同,要使Linux支持多点触摸,还是要搭配或开发驱动。在驱动层中主要是把数据接收下来,然后根据多点触摸协议,上传到input 子系统。


下面是多点触摸协议:


for (i=0; i

input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, point[i].valid); //如果当前点有效,则point[i].valid大于0的数即可


input_event(input, EV_ABS, ABS_MT_POSITION_X, point[i].x);


input_event(input, EV_ABS, ABS_MT_POSITION_Y, point[i].y);


input_mt_sync(input);


}


//一帧数据发送完成,发送一个同步信号


input_sync(input);


具体的协议说明,可参照source code中的文档(Documentation\input\multi-touch-protocol.txt)。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux RTC机制实现计时器类 下一篇Linux29内核输入子系统多点上报机..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Python爬虫教程(从 (2025-12-26 16:49:14)
·【全269集】B站最详 (2025-12-26 16:49:11)
·Python爬虫详解:原 (2025-12-26 16:49:09)
·Spring Boot Java: (2025-12-26 16:20:19)
·Spring BootでHello (2025-12-26 16:20:15)