问题还没解决呢,别夸我了!
我看到这样一篇文档:【引】
bin/qtopia
TS_INFO_FILE=/sys/devices/virtual/input/input0/uevent
if [ -e $TS_INFO_FILE -a "/bin/grep -q TouchScreen < $TS_INFO_FILE" ]; then
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0 USB:/dev/input/mice"//鼠标和触摸屏共存会偏移
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
rm /etc/pointercal
fi
else
export QWS_MOUSE_PROTO="USB:/dev/input/mice"
>/etc/pointercal
fi
unset TS_INFO_FILE
}
所以我修改了那一部分:
下面是我串口终端的信息:
【
Please press Enter to activate this console.
[root@FriendlyARM /]# vi etc/profile
# Ash profile
# vim: syntax=sh
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
USER="`id -un`"
LOGNAME=$USER
PS1='[\u@\h \W]\# '
PATH=$PATH
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1 PATH
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export POINTERCAL_FILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=lib:/usr/local/lib:$T_ROOT/lib:$LD_LIBRARY_PATH
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
[1] + Stopped vi etc/profile
[root@FriendlyARM /]# vi bin/qtopia
#!/bin/sh
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QTDIR=/opt/Qtopia
export QPEDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH
TS_INFO_FILE=/sys/devices/virtual/input/input0/uevent
if [ -e $TS_INFO_FILE -a "/bin/grep -q TouchScreen < $TS_INFO_FILE" ]; then
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
rm /etc/pointercal
fi
else
export QWS_MOUSE_PROTO="USB:/dev/input/mice"
>/etc/pointercal
fi
unset TS_INFO_FILE
[2] + Stopped vi bin/qtopia
[root@FriendlyARM /]# echo $QWS_MOUSE_PROTO
Tslib:/dev/input/event0
[root@FriendlyARM /]# ls dev/input/
event0 mice mouse0
[root@FriendlyARM /]# cat dev/input/event0
1(195,320)(0x0c3,0x140)
==end=
ph7
@p?
Jp8
1(194,320)(0x0c2,0x140)
==end=
p
1(194,320)(0x0c2,0x140)
==end=
==end=
p?
p?
Jp?
[root@FriendlyARM /]# cat dev/input/event0
1(134,349)(0x086,0x15d)
==end=
9亖9佈1(134,349)(0x086,0x15d)
==end=
==end=
^C
[root@FriendlyARM /]# ./usr/local/tslib/bin/ts_test
Segmentation fault
[root@FriendlyARM /]# rm etc/pointercal
[root@FriendlyARM /]# ./usr/local/tslib/bin/ts_test
1(235,240)(0x0eb,0x0f0)
==end=
1(235,240)(0x0eb,0x0f0)
==end=
1(235,240)(0x0eb,0x0f0)
==end=
==end=
166.100255: 235 240 200
166.165094: 235 240 0
】
其中有两个文件的内容,以及dev/input/下cat了两个设备触摸都打了乱码,ts_test运行后的打点信息(1(235,240)(0x0eb,0x0f0)==end=(这个是我驱动打印的上报坐标和i2c读取的值))
。
问题没有解决!