Beginning proper includes; compiles for both 1611 and 16112.
[goodfet] / firmware / tests / blink / blink.c
index d6c7c71..fabe89c 100644 (file)
@@ -1,6 +1,7 @@
-//GOODFET Blinker\r
+//GOODFET Echo test.\r
 \r
 \r
-//1611 is preferred, but 1612 accepted\r
+\r
+#include "platform.h"\r
 \r
 #include <signal.h>\r
 #include <io.h>\r
 \r
 #include <signal.h>\r
 #include <io.h>\r
@@ -14,7 +15,7 @@ void init(){
   WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer\r
   \r
   //LED and TX OUT\r
   WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer\r
   \r
   //LED and TX OUT\r
-  P1DIR = 0x03;\r
+  PLEDDIR |= PLEDPIN;\r
   \r
   //Enable Interrupts.\r
   //eint();\r
   \r
   //Enable Interrupts.\r
   //eint();\r
@@ -30,7 +31,7 @@ int main(void)
     i = 10000;\r
     while(i--);\r
     \r
     i = 10000;\r
     while(i--);\r
     \r
-    P1OUT^=1;                                   // Blink\r
+    PLEDOUT^=PLEDPIN;  // Blink\r
   }\r
 }\r
 \r
   }\r
 }\r
 \r