#include "moje_lib.h" #include "msp430g2231.h" #define LED1 BIT0 #define LED2 BIT1 #define LED3 BIT2 #define LED4 BIT3 #define LED5 BIT4 #define LED6 BIT5 #define LED7 BIT6 #define LED8 BIT7 #define DELAY 12000 void main(void) { WDTCTL = WDTPW + WDTHOLD; P1DIR |= (LED1 + LED2 + LED3 + LED4 + LED5 + LED6 + LED7 + LED8); P1OUT &= ~(LED1 + LED2 + LED3 + LED4 + LED5 + LED6 + LED7 + LED8); for (;;) { P1OUT ^= LED1; delaytime(DELAY); P1OUT ^= LED2; delaytime(DELAY); P1OUT ^= LED3; delaytime(DELAY); P1OUT ^= LED4; delaytime(DELAY); P1OUT ^= LED5; delaytime(DELAY); P1OUT ^= LED6; delaytime(DELAY); P1OUT ^= LED7; delaytime(DELAY); P1OUT ^= LED8; delaytime(DELAY); } }