2 \author Travis Goodspeed
\r
4 This is the main module of the GoodFET, which calls the initialization
\r
5 routines and delegates commands to the various applications.
\r
9 #include "platform.h"
\r
10 #include "command.h"
\r
18 //! Initialize registers and all that jazz.
\r
20 WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
\r
26 //Setup clocks, unique to each '430.
\r
30 //Enable Interrupts.
\r
34 //! Handle a command.
\r
35 void handle(unsigned char app,
\r
40 monitorhandle(app,verb,len);
\r
43 spihandle(app,verb,len);
\r
46 i2chandle(app,verb,len);
\r
49 cchandle(app,verb,len);
\r
52 jtaghandle(app,verb,len);
\r
54 case JTAG430: //Also JTAG430X, JTAG430X2
\r
55 jtag430x2handle(app,verb,len);
\r
59 HANDLEOTHER(app,verb,len);
\r
70 volatile unsigned int i;
\r
71 unsigned char app, verb, len;
\r
75 txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
77 //Command loop. There's no end!
\r
86 cmddata[i]=serial_rx();
\r
88 handle(app,verb,len);
\r