Quantitative tests of AVR power stability,
[goodfet] / firmware / goodfet.c
index 744aa9d..ee97ebb 100644 (file)
@@ -10,7 +10,7 @@
 #include "platform.h"\r
 #include "command.h"\r
 #include "apps.h"\r
-\r
+#include "glitch.h"\r
 \r
 \r
 //LED on P1.0\r
@@ -38,7 +38,11 @@ void handle(unsigned char app,
            unsigned char verb,\r
            unsigned long len){\r
   //debugstr("GoodFET");\r
+  P1OUT&=~1;\r
   switch(app){\r
+  case GLITCH:\r
+    glitchhandle(app,verb,len);\r
+    break;\r
   case MONITOR:\r
     monitorhandle(app,verb,len);\r
     break;\r
@@ -80,9 +84,11 @@ int main(void)
   unsigned long len;\r
   \r
   init();\r
+  glitchsetup();\r
   \r
   txstring(MONITOR,OK,"http://goodfet.sf.net/");\r
   \r
+  \r
   //Command loop.  There's no end!\r
   while(1){\r
     //Magic 3\r