在开发板/bin 目录下用vi打开一个名为setqt4env文件,然后在文件中输入以下内容:
<span style="font-size:18px;">#!/bin/sh
if [ -e /etc/friendlyarm-ts-input.conf ] ; then
. /etc/friendlyarm-ts-input.conf
fi
true ${TSLIB_TSDEVICE:=/dev/<span style="color:#ff0000;">touchscreen-1wire</span>}
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE
export TSLIB_CONFFILE
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if [ -c ${TSLIB_TSDEVICE} ]; then
export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
if [ ! -s /etc/pointercal ] ; then
rm /etc/pointercal
/usr/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root </span>
其中红色的地方表示是使用一线触摸的方式实现触摸方式
然后在命令行下执行. setqt4env (注意.后面有一个空格)
到此结束实现触摸屏的功能