X-Git-Url: http://git.rot13.org//?a=blobdiff_plain;f=firmware%2Ftests%2Fecho%2Fecho.c;fp=firmware%2Ftests%2Fecho%2Fecho.c;h=1f552882851c43d35434ba760967cfdf067595e6;hb=48d828330be887dcd02ffcf0f7e326d5626f5845;hp=fabe89c9bfa60b1c596fc8960ddf800cf35b9457;hpb=3139679760404117b4a15d36a9633679c93c3d0d;p=goodfet diff --git a/firmware/tests/echo/echo.c b/firmware/tests/echo/echo.c index fabe89c..1f55288 100644 --- a/firmware/tests/echo/echo.c +++ b/firmware/tests/echo/echo.c @@ -7,16 +7,30 @@ #include #include + //LED on P1.0 //IO on P5 //! Initialize registers and all that jazz. void init(){ + volatile unsigned int i; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer //LED and TX OUT PLEDDIR |= PLEDPIN; + msp430_init_dco(); + + msp430_init_uart(); + + while(1){ + i = 10000; + while(i--); + + serial_tx(0x80); + PLEDOUT^=PLEDPIN; // Blink + } + //Enable Interrupts. //eint(); } @@ -27,6 +41,12 @@ int main(void) volatile unsigned int i; init(); + + PLEDOUT^=PLEDPIN; // Blink + + //while(1) serial_tx(serial_rx()); + while(1) serial_tx(0x80); + while(1){ i = 10000; while(i--);