What is the dataflow of using touchscreen with tslib?

雨燕双飞 提交于 2019-12-11 03:02:13

问题


I don't understand how tslib works. Let's say I have a serial touchscreen, in my understanding the data flows in the following way: ts press -> serial port -> ts driver -> tslib -> device file (like /dev/input/eventX) Is it right? Or do I need to insert some code between ts driver and tslib so that they can communicate?


回答1:


Tslib does not operate between the touch screen driver and the input device file - it accesses the device file on behalf of the application using it. The key data flow when using tslib is device file -> tslib -> application.

The application specifies the input device file (of the touch device) tslib should use with the ts_open() function and then uses other tslib functions to obtain the touch samples.

The tslib API is defined in tslib.h and there's a number of usage examples in the source under tests including the simple ts_print.c.



来源:https://stackoverflow.com/questions/14351399/what-is-the-dataflow-of-using-touchscreen-with-tslib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!