Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. It was created by Russell King, of arm.linux.org.uk. Examples of implemented filters include jitter smoothing and the calibration transform.
Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality. It is supported by Kdrive (aka TinyX) and OPIE as well as being used on a number of commercial Linux devices including the Nokia 770.
Tslib downloads and source code are now being hosted at github.
Tested on a Ubuntu 12.04 host
Download the tslib sources:
git clone git://github.com/kergoth/tslib.git
Cross-compile them and install to default destinations as per tslib configuration:
./autogen.sh ./configure --host=arm-linux-gnueabihf make && sudo make install
From now you can link your application or libraries agains the tslib but it is not possible to run ts_ - utilites like ts_calibrate because they are arm-binaries, not for x86 architecture.
Default destinations are:
This tutorial was tested on a Ubuntu ARM Core distribution installed on a Somiqboard.
1) download sources to a host as described in the previous paragraph and upload them to the target
2) compile sources by a native gcc compiler installed on the ARM Ubuntu distribution:
./autogen.sh ./configure make && make install
You can now run ts_* utilities like ts_calibrate or ts_test.
Default destinations are:
If you want to use a calibrated touchscreen with your Qt application you need to specify where Tslib files are:
export QWS_MOUSE_PROTO=tslib:/dev/input/event0 export TSLIB_CALIBFILE=/usr/local/etc/pointercal export TSLIB_CONFFILE=/usr/local/etc/ts.conf export TSLIB_PLUGINDIR=/usr/local/lib/ts