Reputation: 570
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?
Upvotes: 2
Views: 2017
Reputation: 116
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.
Upvotes: 4