Is it OK to use macros like this? Does it violate some golden rules of programming?
#define inputPin ((PINA >> 0) & 0x01) #define HIGH 1 #define LOW 0 // *SETUP PORTA* // Pin40, PA0: Input, InputPin // Pin39, PA1: Output, OutPutPin // Pin38, PA2: OutPut for LED // Pins: 76543210 // Values: 00000110 0x06 DDRA = 0x06 while(inputPin == LOW) { //Blink LED // LED ON PORTA |= (1 << PA2); _delay_ms(200); //LED OFF PORTA &= ~(1 << PA2); }