User Tools

Site Tools


tslib

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tslib [2013/06/02 01:14]
maxx created
tslib [2013/06/11 02:13] (current)
maxx
Line 1: Line 1:
 ====== Tslib ====== ====== Tslib ======
  
-[[http://automon.donaloconnor.net/installing-tslib-and-calibrating-it/83/|Installing TSLib and Calibrating it]]+ 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 [[http://github.com/​kergoth/​tslib|github]]. 
 + 
 +===== Tslib compilation on a host ===== 
 +//Tested on a Ubuntu 12.04 host// 
 + 
 +Download the tslib sources: 
 +<​code>​ 
 +git clone git://​github.com/​kergoth/​tslib.git 
 +</​code>​ 
 +Cross-compile them and install to default destinations as per tslib configuration:​ 
 +<​code>​ 
 +./​autogen.sh 
 +./​configure ​--host=arm-linux-gnueabihf 
 +make && sudo make install 
 +</​code>​ 
 +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: 
 +  * include folder for gcc include path -I<​path>​ is '/usr/local/​include'​ 
 +  * lib folder for gcc link path -L<​path>​ is '/​usr/​local/​lib'​ 
 +===== Tslib compilation on a target ===== 
 +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:​ 
 +<​code>​ 
 +./​autogen.sh 
 +./​configure 
 +make && make install 
 +</​code>​ 
 + 
 +You can now run ts_* utilities like ts_calibrate or ts_test. 
 + 
 +Default destinations are: 
 +  * ts.conf is in '/​usr/​local/​etc'​ 
 +  * pointercal file is in '/​usr/​local/​etc'​ 
 + 
 +If you want to use a calibrated touchscreen with your Qt application you need to specify where Tslib files are: 
 +<​code>​ 
 +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 
 +</​code>​ 
  
tslib.1370150073.txt.gz · Last modified: 2013/06/02 01:14 (external edit)