"ARM7 - how to read port pin in LPC2368?"

535 Views Asked by At

I'm using LPC2368 wherein I have got to read the pin status if it is pressed or not? In arm7 I have connected that pin(which I have to monitor) to EINT2. I'm confused with pinsel section & how do i come to know if the key is pressed or not? I have used FIO2PIN and stored it in some variable

x = FIO2PIN;

then checked condition:

if(x == ((IN_Tamper >> 12) & 0X1) == 1)

wherein IN_Tamper is 0X1000;

0

There are 0 best solutions below