I programming AVR ATmega32 for an embedded web-server. There's this C language Syntax that I have confronted and I don't understand.
(PINB &(1<<PB2)) == 0)
I didn't fully understand the meaning of this syntax. I suppose that PINB is the portb register and PB2 is the third bit of this port which is used as an interrupt.
thanks a lot,
They are both defined in the header files. Let me rephrase my question. Imagine we know what are PINB and PB2 both are! Now by this assumption what this syntax will do? That's what I need to know please.
Actually the real syntax is
while((PINB &(1<<PB2)) == 0))
{// statement};
I need to when the statement is going to run by the program. What exactly is the condition?