Nano-X with tslib support

Introduction

We suggest the use of tslib for Panel-Card with touch screen and ADS7846. This arcticle gives a step by step guidance for installing tslib and patching Nano-X

Requirements

Installation

tslib

The tslib archive consists of two directories - one containing the pre-compiled binaries (./tslib/) and one containing the sources (./tslib-1.0/). After extracting edit ./tslib/etc/ts.conf and alter the following line to this version.

# Uncomment if you wish to use the linux input layer event interface
module_raw input
...

The directory ./tslib needs to be added to PanelCard's root file system.

Nano-X

To enable tslib support Nano-X sources need to be patched.

patch -p1 < microwindows-tslib.patch

Before compiling the patched sources change your Nano-X config file to use tslib as input.

...
####################################################################
# Mouse drivers
# GPMMOUSE	gpm mouse
# SERMOUSE	serial Microsoft, PC, Logitech, PS/2 mice (/dev/psaux)
# SUNMOUSE	Sun Workstation mouse (/dev/sunmouse)
# NOMOUSE	no mouse driver
#
# Touchscreen drivers
# IPAQMOUSE	Compaq iPAQ, Intel Assabet (/dev/h3600_tsraw)
# ZAURUSMOUSE	Sharp Zaurus (/dev/sharp_ts)
# TUXMOUSE	TuxScreen (/dev/ucb1x00-ts)
# ADSMOUSE	Applied Data Systems GC+ (/dev/ts)
# EPMOUSE	Embedded Planet (/dev/tpanel)
# VHMOUSE	Vtech Helio (/dev/tpanel)
# MTMOUSE	MicroTouch serial (/dev/ttyS1)
# PSIONMOUSE	Psion 5 (/dev/touch_psion)
# YOPYMOUSE	Yopy (/dev/yopy-ts)
# HARRIERMOUSE	NEC Harrier (/dev/tpanel)
####################################################################
GPMMOUSE                 = N
SERMOUSE                 = N
SUNMOUSE                 = N
NOMOUSE                  = N
IPAQMOUSE                = N
ZAURUSMOUSE              = N
TUXMOUSE                 = N
ADSMOUSE                 = N
EPMOUSE                  = N
VHMOUSE                  = N
MTMOUSE                  = N
PSIONMOUSE               = N
YOPYMOUSE                = N
HARRIERMOUSE             = N
TSLIBMOUSE               = Y
...

It is also necessary to add your path to tslib to Makefile.rules.

For example :

...
TSLIB_DIR	= /develop/tslib
...

After compiling copy ./lib/libnano-X.so (to /lib/), ./bin/nano-X and ./bin/nanowm (both to /bin/) to PanelCard's root file system.

Usage

It is not required to make any changes to your programs when using Nano-X with tslib support, but it is necessary to inform Nano-X about the device used by tslib.

export TSLIB_TSDEVICE=/dev/event0
nano-X&
nanowm&
my_application