Difference between revisions of "Tslib"

From ArmadeusWiki
Jump to: navigation, search
(Usage)
(Usage)
Line 34: Line 34:
  
 
* and to define some ENVT variables:
 
* and to define some ENVT variables:
  export TSLIB_TSDEVICE=/dev/input/touchscreen0
+
  export TSLIB_TSDEVICE=/dev/input/event0
 
  export TSLIB_TSEVENTTYPE=INPUT
 
  export TSLIB_TSEVENTTYPE=INPUT
 
  export TSLIB_CONFFILE=/etc/ts.conf
 
  export TSLIB_CONFFILE=/etc/ts.conf
 +
export TSLIB_CALIBFILE=/etc/ts.calib
 
   
 
   
* to create /dev/input/touchscreen0 from the infos got from:
+
* to create /dev/input/event0 from the infos got from:
  # cat /sys/class/input/input0/mouse0/dev
+
  # cat /sys/class/input/event0/dev
  13:32
+
  13:64
 
  # mkdir /dev/input
 
  # mkdir /dev/input
 
  # cd /dev/input/
 
  # cd /dev/input/
  # mknod touchscreen0 c 13 32
+
  # mknod event0 c 13 64
 
  # ls -al
 
  # ls -al
 
  drwxr-xr-x    2 root    root            0 Jan  1 00:39 .
 
  drwxr-xr-x    2 root    root            0 Jan  1 00:39 .
 
  drwxr-xr-x    5 root    root            0 Jan  1 00:39 ..
 
  drwxr-xr-x    5 root    root            0 Jan  1 00:39 ..
  crw-r--r--    1 root    root      13,  32 Jan  1 00:39 touchscreen0
+
  crw-r--r--    1 root    root      13,  64 Jan  1 00:39 event0
 
  #
 
  #
  

Revision as of 08:26, 2 July 2007

Library to provide a common interface to touchscreen and allow touchscreen events filtering or calibrating...

Compiling

  • Be sure to have libtool package installed (tested with 1.5.22-4 version). Otherwise you will have following errors:
configure.ac:25: error: possibly undefined macro: AC_DISABLE_STATIC
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation.
configure.ac:26: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:27: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.ac:28: error: possibly undefined macro: AC_PROG_LIBTOOL
  • Be sure to have automake-1.6 or higher package installed (tested with 1.7 version -> working and 1.9.6 -> not working !). After automake package installation don't forget to update your /etc/alternatives/automake and /etc/alternatives/aclocal symlinks (tested on Ubuntu).
lrwxrwxrwx 1 root root 20 2007-06-27 21:43 /etc/alternatives/aclocal -> /usr/bin/aclocal-1.7
lrwxrwxrwx 1 root root 21 2007-06-27 21:39 /etc/alternatives/automake -> /usr/bin/automake-1.7
  • In Buildroot, if you don't have configured the C++ cross-compiler yet, then:
$ make menuconfig
Toolchain Options  --->
 [*] Build/install c++ compiler and libstdc++?
 [*] Build/install a shared libgcc?

Usage

  • To work, Tslib needs a valid config file:
# cat /etc/ts.conf

# Uncomment if you wish to use the linux input layer event interface
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
  • and to define some ENVT variables:
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/ts.calib

  • to create /dev/input/event0 from the infos got from:
# cat /sys/class/input/event0/dev
13:64
# mkdir /dev/input
# cd /dev/input/
# mknod event0 c 13 64
# ls -al
drwxr-xr-x    2 root     root            0 Jan  1 00:39 .
drwxr-xr-x    5 root     root            0 Jan  1 00:39 ..
crw-r--r--    1 root     root      13,  64 Jan  1 00:39 event0
#

Links