就是mini2440的button驱动程序的中断处理部分:
硬件接法是:
button1-GPG(0)
button2-GPG(3)
button3-GPG(5)
button4-GPG(6)
button5-GPG(7)
button6-GPG(11)
我做了个测试程序:在驱动程序中读出 unsigned int s3c2410_gpio_getpin(GPG(0~11))的返回值;
分别对应如下(%u打印出来的):1,8,32,64,128,2048
如果有按键按下的话,对应的值为0
这个返回值正确吗?
[ 此帖被value在2011-12-27 12:06重新编辑 ]