NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Tslib

From Texas Instruments Wiki
Jump to: navigation, search


About[edit]

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. Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality.


Source Download Location[edit]

Visit tslib github

Cross compiling[edit]

  • Run ./configure --prefix=(Abosolute path on NFS) --host=arm-linux-gnu.
  • Edit the file config.h and comment the line "#define malloc rpl_malloc" to avoid this option:"#define malloc rpl_malloc" -> "//#define malloc rpl_malloc"
    • AC_FUNC_MALLOC in configure.ac seems to cause malloc to be defined to rpl_malloc, which is never implemented and therefore cause a link error.Removing this line from AC_FUNC_MALLOC is a workaround i got after browsing net.
  • Issue make and make install.
  • This will generate the ts_calibrate and ts_test executables.


Configuration(required for execution).[edit]

Make sure you have the following settings right(You can have them in your profile).

  • export TSLIB_FBDEVICE=/dev/fb0
    • This is for the Fbdev device node to be used for display.
  • export TSLIB_TSDEVICE=/dev/input/touchscreen0
  • export TSLIB_CONFFILE=/etc/ts.conf


Execution[edit]

  • First run ts_calibrate to calibrate the touch screen.
  • You can now run ts_test application. This application helps in moving a cross-hair pattern around the LCD touchscreen. The pattern moves with your stylus movements. Also there is a draw option supported. Using your stylus you can write/draw on touchscreen.


Execution logs[edit]

The logs of ts_calibrate,ts_test run is provided below-

TS_READ----> x = 4, y = 306, pressure = 673
416.280517:     4    306    673
TS_READ----> x = 4, y = 306, pressure = 679
416.286407:     4    306    679
TS_READ----> x = 5, y = 308, pressure = 0
416.291717:     5    308      0

The logs mainly print the coordinate positions and pressure values according to the stylus movements on the touchscreen.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Tslib here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Tslib here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Tslib here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Tslib here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Tslib here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Tslib here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Tslib here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Tslib here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Tslib here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity