令人困惑的触摸中断
关于中断,看到如下韦东山大神这段关于中断的处理,恳请懂行的朋友指点一二感激不尽。void AdcTsIntHandle(int irq)
{
if (SUBSRCPND & (1<<TC_INT_BIT))/* 如果是触摸屏中断 */
Isr_Tc();
if (SUBSRCPND & (1<<ADC_INT_BIT))/* ADC中断 */
Isr_Adc();
SUBSRCPND = (1<<TC_INT_BIT) | (1<<ADC_INT_BIT);
}
S3C2440芯片手册里,if (SUBSRCPND & (1<<TC_INT_BIT))中的SUBSRCPND寄存器初始值默认是0(未请求),这里的TC_INT_BIT=9(触摸屏中断位在第9位上),SUBSRCPND第9位如果初始值是0&上1<<9位后等于0,这怎么开启中断?还是说前面配置好的GPIO口的为中断,SRCPND和INTPND开启,只要触摸后触发中断SUBSRCPND自动置1然后&1<<9等于1启动触摸屏中断?{:1_908:}
页:
[1]