主题 : 加载触摸屏模块没反应,求救 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 27365
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2010-08-24
最后登录: 2015-02-08
楼主  发表于: 2012-01-13 09:41

 加载触摸屏模块没反应,求救

大家好,我把触摸屏作为一个可加载的模块编译,加载成功,从串口也可以看到打印出来的坐标,但为什么系统没做出反应呢????


鼠标应该会跟着动才对啊?要先校准?但没校准也不该一点反应都没啊,我还是用的自带的系统,只不过作为模块编译了
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2012-01-13 09:56
你确定你的"系统"能从驱动里读到坐标?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 27365
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2010-08-24
最后登录: 2015-02-08
2楼  发表于: 2012-01-13 10:24
是的,老大,驱动里我打印出坐标,

input_report_abs(dev, ABS_X, xp);
input_report_abs(dev, ABS_Y, yp);

printk("the xp is %ld ,",xp);
printk("the yp is %ld \n,",yp);

在超级终端上可看到。


,the xp is 442 ,the yp is 504
,the xp is 470 ,the yp is 458
,the xp is 490 ,the yp is 400
,the xp is 507 ,the yp is 343
,the xp is 517 ,the yp is 314
,the xp is 517 ,the yp is 307
,the xp is 516 ,the yp is 315
,the xp is 513 ,the yp is 325
,the xp is 501 ,the yp is 365
,the xp is 474 ,the yp is 396
,the xp is 444 ,the yp is 437
,the xp is 411 ,the yp is 477
,the xp is 381 ,the yp is 519
,the xp is 359 ,the yp is 557
,the xp is 345 ,the yp is 582
,the xp is 341 ,the yp is 597
,the xp is 346 ,the yp is 598
,the xp is 353 ,the yp is 597
,the xp is 382 ,the yp is 585
,the xp is 407 ,the yp is 556
,the xp is 438 ,the yp is 524
,the xp is 470 ,the yp is 483
,the xp is 493 ,the yp is 441
,the xp is 503 ,the yp is 400
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2012-01-13 10:29

 回 2楼(yelang) 的帖子

我不是说你的驱动,而是上面的GUI
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 27365
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2010-08-24
最后登录: 2015-02-08
4楼  发表于: 2012-01-13 10:32
版主,我还有点不明白,上报的坐标是大概是70到930,  (0-1024)

什么时候转换成(240,320) 的啊,找不到装换的代码?
级别: 新手上路
UID: 27365
精华: 0
发帖: 9
金钱: 45 两
威望: 9 点
综合积分: 18 分
注册时间: 2010-08-24
最后登录: 2015-02-08
5楼  发表于: 2012-01-13 10:37
哦,我还不知道系统上哪个GUI能看坐标?,我可以用鼠标操作,我觉得"系统"肯定不能从驱动里读到坐标,因为一点反应都没得,谢谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2012-01-13 12:32

 回 4楼(yelang) 的帖子

这个通常是在触摸屏的校准(Calibration)程序里实现的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2012-01-13 12:34

 回 5楼(yelang) 的帖子

这取决于你所用的GUI系统。以Android为例,负责从触摸屏驱动里读取坐标的是Framework里的Input Event Hub模块。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."