2 \author Travis Goodspeed
\r
5 This is the main module of the GoodFET, which calls the initialization
\r
6 routines and delegates commands to the various applications.
\r
10 #include "platform.h"
\r
11 #include "command.h"
\r
19 //! Initialize registers and all that jazz.
\r
21 WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
\r
27 //Setup clocks, unique to each '430.
\r
31 //Enable Interrupts.
\r
35 //! Handle a command.
\r
36 void handle(unsigned char app,
\r
41 monitorhandle(app,verb,len);
\r
44 spihandle(app,verb,len);
\r
47 i2chandle(app,verb,len);
\r
50 cchandle(app,verb,len);
\r
53 jtaghandle(app,verb,len);
\r
55 case JTAG430: //Also JTAG430X, JTAG430X2
\r
56 jtag430x2handle(app,verb,len);
\r
60 HANDLEOTHER(app,verb,len);
\r
71 volatile unsigned int i;
\r
72 unsigned char app, verb, len;
\r
76 txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
78 //Command loop. There's no end!
\r
87 cmddata[i]=serial_rx();
\r
89 handle(app,verb,len);
\r