Chinaunix首页 | 论坛 | 博客
  • 博客访问: 579981
  • 博文数量: 136
  • 博客积分: 893
  • 博客等级: 中士
  • 技术积分: 1001
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-31 09:18
个人简介

生命可以终止,梦想不会!

文章分类

全部博文(136)

文章存档

2016年(4)

2015年(2)

2014年(5)

2013年(7)

2012年(118)

分类:

2012-03-31 13:45:35

本来 这一篇章应该在 QT移植之前,但是没有写,现在补上,触摸屏驱动移植

没有仔细研究 触摸屏AD 哪些东西,只是按照手册,使用了tq写好的ADC 驱动

参考:qt 09 移植手册

1.复制 tq-2.6.30.4/drivers/input/touchsreen/tq2440_ts.c  到自己内核
       2.6.33/drivers/input/touchsreen/ywx2440_ts.c

2.修改 ywx2440_ts.c 在 第41行
//extern struct semaphore ADC_LOCK;  修改为下面的
DECLARE_MUTEX(ADC);

3.修改 /touchscreen/Kconfig  最后一行
添加
  1. config TOUCHSCREEN_YWX2440
  2.     tristate "ywx 2440 TouchScreen input driver"
  3.     depends on ARCH_S3C2410 && INPUT && INPUT_TOUCHSCREEN
  4.     help
  5.      Say Y here if you have the ywx2440 TouchScreen.

  6.      If unsure, say N.

  7.      To compile this driver as a module, choose M here: the
  8.      module will be called ywx2440_ts.

  9. endif
4.修改 /touchscreen/Makefile
  1. obj-$(CONFIG_TOUCHSCREEN_YWX2440)    +=ywx2440_ts.o

5.配置内核

Device driver ->
     input device support->
       (320) Horizontal screen resolution
       (240) Vertical screen resolution
  
       (*) Event interface  
       [*] Touchscreens  ->
              <*> ywx 2440 TouchScreen input driver


6.启动时,打印 触摸屏驱动 移植好
  1. USB Serial support registered for pl2303
  2. usbcore: registered new interface driver pl2303
  3. pl2303: Prolific PL2303 USB to serial adaptor driver
  4. mice: PS/2 mouse device common for all mice

  5. TQ2440 TouchScreen successfully loaded            ###这里打印输出
  6. input: TQ2440 TouchScreen as /class/input/input0

  7. S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
  8. s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled









 
阅读(788) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~