Beginning proper includes; compiles for both 1611 and 16112.
[goodfet] / firmware / tests / echo / echo.c
diff --git a/firmware/tests/echo/echo.c b/firmware/tests/echo/echo.c
new file mode 100644 (file)
index 0000000..fabe89c
--- /dev/null
@@ -0,0 +1,37 @@
+//GOODFET Echo test.\r
+\r
+\r
+#include "platform.h"\r
+\r
+#include <signal.h>\r
+#include <io.h>\r
+#include <iomacros.h>\r
+\r
+//LED on P1.0\r
+//IO on P5\r
+\r
+//! Initialize registers and all that jazz.\r
+void init(){\r
+  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer\r
+  \r
+  //LED and TX OUT\r
+  PLEDDIR |= PLEDPIN;\r
+  \r
+  //Enable Interrupts.\r
+  //eint();\r
+}\r
+\r
+//! Main loop.\r
+int main(void)\r
+{\r
+  volatile unsigned int i;\r
+  init();\r
+  \r
+  while(1){\r
+    i = 10000;\r
+    while(i--);\r
+    \r
+    PLEDOUT^=PLEDPIN;  // Blink\r
+  }\r
+}\r
+\r