System: Ubuntu 11.04
Compilation Tools: arm-linux-gcc 4.3.2
Compile target: tslib1.4
(1) Install arm-linux-gcc 4.3.2,
(2) Extract tslib-1.4.tar.gz to any directory
(3) Enter tslib directory cd tslib
Due to the first-line touch of tiny6410, you need to change the program, according to others:
Open tslib/plugins/input-raw.c
Change the ts_input_read function to the following:
[cpp] view plaincopyprint? static int ts_input_read(struct tslib_module_info *inf,
struct ts_sample *samp, int nr)
{
printf (" HEAD=== ts_input_read in INPUT-RAW.C\ ");
struct tslib_input *i = (struct tslib_input*)inf;
struct tsdev *ts = inf->dev ;
struct input_event ev;
int ret = nr;
int total = 0;
unsigned long jjts;
While(total
{
ret =read(ts->fd, &jjts,sizeof(jjts));
//if (ret==- 1) continue;
if (ret==-1) return 0;
samp->pressure=(jjts>>31)& 0x01;
Samp->x=(jjts>>16)& 0xffff;
samp->y=jjts & 0xffff;
samp++;
total++;
}
ret=total;
return ret;
}
Special Note:
A lot of information, above is if (ret==-1) continue; after doing it, I found that the touch screen can be calibrated, but when running the qt program, the cursor can move, but the click is invalid. So change to
if (ret==-1) return 0; the problem is solved.
(4) Install library support:
sudo apt-get install autoconf automake libtool
(5)export PREFIX=/opt/tslib Set target location
(6)./autogen.sh is used to generate the configure script
(7)echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache Generate a cache file arm-linux.cache, deceive configure
(8)CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache
( 9) make
(10) make install
After compiling successfully, generate /bin, /etc, /include, /lib 4 folders in the target location
(11 Modify the /opt/tslib/etc/ts.conf file and delete the contents to
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
The first line is the module that tslib needs to read data from the linux input device. The module specified here is Input, which needs to be used Modules, need to refer to other data.
The second line of pthres provides the touchscreen sensitivity threshold for Tslib.
The third line of variance provides a touchscreen filtering algorithm plugin for Tslib.
The fourth line of dejitter is a plugin for the touchscreen denoising algorithm provided by Tslib.
The fifth line is a touchscreen coordinate transformation plugin provided by Tslib.
(12) Copy the tslib folder under /opt to /opt under the arm file system
(13) Set the environment variable script tslib.sh
[java View plaincopyprint? #!/bin/sh
export TSLIB_ROOT=/opt/tslib
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export TSLIB_CALIBFILE=$TSLIB_ROOT/Etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=/dev/tty
export TSLIB_FBDEVICE=/dev/fb0
(14) Start the arm board and execute the script from the command line
source tslib.sh
(15) Calibrate the touch screen
cd /opt/tslib/bin
./ts_calibrate
A calibration screen will appear, and a pointercal file will be generated upon completion
(16)Links
ln -s /opt/tslib/etc/pointercal /etc/pointercal
At this point, tslib1.4 porting is complete
How Linux extends the XFS file system. There is extra space on the disk, so I want to extend the exi
linux hard disk partition format and mount 1, hard disk interface type Hard disk interface is gene
There are 7 startup levels in Linux: #0 - halt (Do NOT set initdefault to this)# 1 - Single
First find the iptables file Generally under /etc/sysconfig Then vi iptables Just like add
Method for installing RPM format package in Ubuntu system
Linux hard disk partition format and mount
Learning of redirected output in Linux
Inter-process communication in the Linux environment: pipelines and well-known pipelines
Linux installer and common methods of relying on the installation package
Linux ApachePHPMysql default installation path
Linux device files and regular files
Using forever to implement Node.js project on Linux
Four shifting engines for the Googles BBR TCP congestion control algorithm
Win10 preview version 10586 updated what
Win7 system computer and other people's voice heard the sound of the other party is very small
What should I do if the Winodws 8 network connection is not available?
Win8 System Credential Manager Usage Tips
XP system network function two optimization skills
IE always automatically shuts down and prompts the flash plugin to fail
Ramdisk can not sleep under Win 7 solution