以下是对代码linux-2.6.25.8driversinput ouchscreen文件夹下的EmbedSky_ts.c程序的分析(关于此内核是天嵌公司ARM9开发板对应的内核)
这里我们要关注的是以下三个程序段touch_timer_fire,stylus_updown,stylus_action第一个是后两者的子集,换句话说就是后两者分别调用前者的。后两者是在EmbedSky_ts_probe里面事先注册的,代码如下:
if (request_irq(IRQ_ADC, stylus_action, SA_SAMPLE_RANDOM, "s3c2410_action", ts.dev))
{
printk(KERN_ERR "EmbedSky_ts.c: Could not allocate ts IRQ_ADC ! ");
iounmap(base_addr);
return -EIO;
}
if (request_irq(IRQ_TC, s