编译:
tar xzf tslib-1.4.tar.gz
cd tslib
./autogen.sh
mkdir tmp
echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=$(pwd)/tmp
make
make install
安装:
把tmp全部拷贝到开发板的根目录/;我是先考到nfs在考到根目录/
cp tmp /mynfs -rf
cd tmp
cp * / -rf
使用:
先安装s3c_ts.ko, lcd.ko
1.
修改 /etc/ts.conf第1行(去掉#号和第一个空格):
# module_raw input
改为:
module_raw input
2.
export TSLIB_TSDEVICE=/dev/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
ts_calibrate
ts_test
如果执行上两个命令有这一错误:selected device is not a touchscreen I understand
要么是版本过高或过低我的是1.4的
在内核源码中include/linux/input.h
我的是define EV_VERSION 0x010001
再看tslib的代码,对EV_VERSION的定义为0x010000。
有网友的是
我的是define EV_VERSION 0x010000
再看tslib的代码,对EV_VERSION的定义为0x010001。
如果是android内核的话:
1.要把多点触摸改为单点触摸,只上报第一点
2.要把所有ABS_MT_*事件给去掉
电容屏单点的tslib的使用
最新推荐文章于 2024-01-29 22:19:47 发布