I'm trying to read the value present on a pin of my AtMega328P.
I'm doing it by:
#define PIN_TO_READ PINB.1 /*.. **..code **..more code **/ DDRB &= ~(1 << PB1); //set input mode on this pin PORTB &= ~(1 << PB1);//not sure if I need to do this val = PINT_TO_READ; //set PB1 pin back to output mode DDRB |= (1 << PB1);
But the compiler says:
error: expected ‘;’ before numeric constant #define PIN_TO_READ PINB.1 ^ |
How can I do this?