Changing plugin structure.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Oct 2012 12:37:51 +0000 (12:37 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Oct 2012 12:37:51 +0000 (12:37 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1285 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/apps/plugins/Makefile [deleted file]
firmware/apps/plugins/ps2.c [deleted file]

index 51633a9..c77467e 100644 (file)
@@ -278,10 +278,10 @@ ifeq ($(filter smartcard, $(config)), smartcard)
        hdrs+= smartcard.h
 endif
 
        hdrs+= smartcard.h
 endif
 
-# include ps2 app
-ifeq ($(filter ps2, $(config)), ps2)
-       apps+= apps/plugins/ps2.o
-       hdrs+= ps2.h
+# include plugin app
+ifeq ($(filter plugin, $(config)), plugin)
+       apps+= apps/plugin.o
+       hdrs+= plugin.h
 endif
 
 # include jscan app
 endif
 
 # include jscan app
diff --git a/firmware/apps/plugins/Makefile b/firmware/apps/plugins/Makefile
deleted file mode 100644 (file)
index fc5470e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-ps2.hex:
-       cd ../.. && moreapps=apps/plugins/ps2.o make clean all && mv goodfet.hex apps/plugins/ps2.hex
diff --git a/firmware/apps/plugins/ps2.c b/firmware/apps/plugins/ps2.c
deleted file mode 100644 (file)
index b751416..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*! \file glitch.c
-  \author Travis Goodspeed
-  \brief PS2 Timing Monitor for GoodFET
-  
-  This module spies on PS/2.  For now, it just reports the
-  inter-character timing information.
-*/
-
-#include "platform.h"
-#include "command.h"
-#include "ps2.h"
-#include "jtag.h"
-
-//! Handles a monitor command.
-void ps2_handle_fn( uint8_t const app,
-                                       uint8_t const verb,
-                                       uint32_t const len);
-
-
-// define the ps2 app's app_t
-app_t const ps2_app = {
-
-       /* app number */
-       PS2,
-
-       /* handle fn */
-       ps2_handle_fn,
-
-       /* name */
-       "PS2",
-
-       /* desc */
-       "\tThe PS2 app spies on PS/2.  For now, it just reports the\n"
-       "\tinter-character timing information.\n"
-};
-
-
-u32 mclock=0;
-u32 clock=0;
-
-// Timer A0 interrupt service routine
-interrupt(TIMERA0_VECTOR) Timer_A (void)
-{
-  if(!clock++)
-    mclock++;
-  return;
-}
-
-
-
-/** Pins (Clk, Dat)
-    TDI P5.1
-    TDO P5.2
-*/
-
-u32 oldclock=0;
-//! Handles a monitor command.
-void ps2_handle_fn( uint8_t const app,
-                                       uint8_t const verb,
-                                       uint32_t const len)
-{
-  switch(verb){
-  case START:
-    WDTCTL = WDTPW + WDTHOLD;             // Stop WDT
-    TACTL = TASSEL1 + TACLR;              // SMCLK, clear TAR
-    CCTL0 = CCIE;                         // CCR0 interrupt enabled
-    CCR0 = 0x100; //clock divider
-    TACTL |= MC_3;
-    _EINT();                              // Enable interrupts 
-    
-    
-    P5DIR&=~(TDI+TDO);//input mode
-    P5OUT=0; // pull down
-    
-    debugstr("Waiting for a keypress.");
-    //Wait for a keypress.
-    
-    while(1){
-      //Debounce the 1s polling
-      while((P5IN&TDI && P5IN&TDO))
-       while((P5IN&TDI));// && P5IN&TDO));
-      
-      //Transmit the data only if it is new.
-      if((clock-oldclock)>0x100){
-       cmddatalong[0]=clock;//-oldclock;
-       cmddatalong[0]-=oldclock;
-       oldclock=clock;
-       
-       txdata(app,verb,4);
-      }
-    }
-    break;
-  case STOP:
-  default:
-    debugstr("Unknown ps2 verb.");
-    txdata(app,NOK,0);
-  }
-}