Hi guys, Ive got an error with this code. The error says ''Expected declaration''. Code: // // // // #include "msp430x20x1.h" void main(void); { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1DIR=0x7F; // P1.0 t/m P1.6 OUTPUT while(1); { if((P1IN&0x08)==0x08); { P1OUT=0x7F; } else { P1OUT=0x01; } return 0; } } Thanks in advance!
I wanna realize when P1IN = 0x07 al output pins 0x7F get high. I'm just started with C so i'm a complete beginner. What do you mean with that infite loop?