Removing the ugliest of hacks.
[goodfet] / firmware / goodfet.c
index b08313f..2fe74e1 100644 (file)
@@ -28,6 +28,11 @@ void init(){
   msp430_init_dco();\r
   msp430_init_uart();\r
   \r
+  //DAC should be at full voltage if it exists.\r
+  #ifdef DAC12IR\r
+  glitchvoltages(0xfff,0xfff);\r
+  #endif\r
+  \r
   //Enable Interrupts.\r
   //eint();\r
 }\r
@@ -38,6 +43,7 @@ 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
@@ -68,9 +74,9 @@ void handle(unsigned char app,
       pluginhandle(app,verb,len);\r
     }else{\r
       debugstr("Plugin missing.");\r
+      debughex(app);\r
       txdata(app,NOK,0);\r
     }\r
-      \r
     break;\r
   }\r
 }\r
@@ -83,8 +89,7 @@ int main(void)
   unsigned long len;\r
   \r
   init();\r
-  glitchsetup();\r
-  \r
+\r
   txstring(MONITOR,OK,"http://goodfet.sf.net/");\r
   \r
   \r