main.c 327 B

1234567891011121314151617181920212223
  1. #include <msp430g2553.h>
  2. #define LED1 BIT6
  3. #define LED0 BIT0
  4. void delay_cycles(unsigned long long delay) {
  5. volatile unsigned long long i;
  6. for (i = 0; i < delay; i++);
  7. }
  8. int main(void)
  9. {
  10. P1DIR |= (LED1 | LED0);
  11. P1OUT &= (LED1 | LED0);
  12. while (1){
  13. P1OUT ^= (LED1 | LED0);
  14. delay_cycles(1000000000000);
  15. }
  16. return 0;
  17. }