易截截图软件、单文件、免安装、纯绿色、仅160KB

linux的触摸屏之三:解析android平台上的tslib过程

(1)在tslib目录下有设置环境变量的文本文件:settsenv.sh,内容:
export T_ROOT=/system
export LD_LIBRARY_PATH=$T_ROOT/lib
export TSLIB_CONSOLEDEVICE=
export TSLIB_FBDEVICE=/dev/graphics/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_PLUGINDIR=$T_ROOT/lib/ts
export TSLIB_CONFFILE=$T_ROOT/etc/tslib/ts.conf
export TSLIB_CALIBFILE=/data/data/pointercal
设定的TSLIB的TS设备,FB设备,配置文件,动态库文件的路径。当然,具体的要用的可以在程序代码中重新设定。
(2)tslib目录下的etc目录ts.conf是配置文件,内容:
# Uncomment if you wish to use the linux input layer event interface
module_raw input1
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
可见,上面有很多模块可以调用,最终是选择了input1,也即是linux的input获取方式。这些模块的源代码在plugins目录下都有定义。
(3)分析流程,接触摸屏分析之一,在ts_main中:
void get_sample (struct tsdev *ts, calibration *cal,   int index, int x, int y, char *name) 
{
       put_cross(x, y, 2 | XORMODE);   //画十字座标
       getxy (ts, &cal->x [index], &cal->y [index]); //取得x,y的LCD坐标值
       put_cross(x, y, 2 | XORMODE);
       last_x = cal->xfb [index] = x; 
       last_y = cal->yfb [index] = y;        //赋值cal的触摸屏坐标
}
(4)解析getxy
struct ts_sample {


相关文档:

Linux下安装mysql

1:下载社区版的mysql,
     要下载两个文件,分别为:MySQL-server-community-5.1.46-1.rhel5.i386.rpm
                               ......

关于Linux信号的总结


标准信号与实时信号
0-31 这 32 个信号称为标准信号。
从 32 到 63 之间的 32 个信号称为实时信号。
可以通过 man 7
signal 查看对“标准信号”和“实时信号”详细的描述。
信号排队
每个进程拥有一个信号等待队列。在 task_struct 中有一个 struct sigpending pending 域,
就是进程的信号 ......

Linux redhat9.0常用命令(1)文件访问权限

[root@localhost root]# ls -l
会显示目录或文件信息:drwxr-xr-x 2 root root 4096 06-29 14:30 Test
                               -rwxr--r-- 2 root roo ......

Linux内核源代码数量已经超过1000万行

Linux版本2.6.27更新后,人们发现,这一内核的源代码数量已经超过了1000万行.
当然,这些行数仅仅是计算机统计出来的行数,包括空白行,为了代码的可读性增加的注释等,当然Linux和所有的长期项目一样,随着时间的推移,旧的代码 会被丢弃和更换,但总体规模来说,Linux的内核在不断增强,以下是一些有趣的统计数字,它们可以告诉你Lin ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号