Added Eclipse IDE examples

This commit is contained in:
Ivan Kravets
2014-06-16 22:45:24 +03:00
parent 5e07c08055
commit a39bfd8f3d
22 changed files with 605 additions and 0 deletions
@@ -0,0 +1,26 @@
/**
* Copyright (C) Ivan Kravets <me@ikravets.com>
* See LICENSE for details.
*/
#include <msp430g2553.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD;
// make the LED pin an output for P1.0
P1DIR |= 0x01;
volatile int i;
while (1)
{
for (i = 0; i < 10000; i++);
// toggle the LED
P1OUT ^= 0x01;
}
return 0;
}