projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restoring 16-bit MSP430 support.
[goodfet]
/
firmware
/
goodfet.c
diff --git
a/firmware/goodfet.c
b/firmware/goodfet.c
index
d993167
..
d09683c
100644
(file)
--- a/
firmware/goodfet.c
+++ b/
firmware/goodfet.c
@@
-1,13
+1,16
@@
-//GOODFET Main File
\r
-//Includes several applications.
\r
+/*! \file goodfet.c
\r
+ \author Travis Goodspeed
\r
+ \brief Main module.
\r
+
\r
+ This is the main module of the GoodFET, which calls the initialization
\r
+ routines and delegates commands to the various applications.
\r
+*/
\r
+
\r
\r
#include "platform.h"
\r
#include "command.h"
\r
#include "apps.h"
\r
\r
\r
#include "platform.h"
\r
#include "command.h"
\r
#include "apps.h"
\r
\r
-#include <signal.h>
\r
-#include <io.h>
\r
-#include <iomacros.h>
\r
\r
\r
//LED on P1.0
\r
\r
\r
//LED on P1.0
\r
@@
-15,12
+18,13
@@
\r
//! Initialize registers and all that jazz.
\r
void init(){
\r
\r
//! Initialize registers and all that jazz.
\r
void init(){
\r
- volatile unsigned int i;
\r
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
\r
\r
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
\r
\r
- //LED
and TX OUT
\r
+ //LED
out and on.
\r
PLEDDIR |= PLEDPIN;
\r
PLEDDIR |= PLEDPIN;
\r
+ PLEDOUT |= PLEDPIN;
\r
\r
\r
+ //Setup clocks, unique to each '430.
\r
msp430_init_dco();
\r
msp430_init_uart();
\r
\r
msp430_init_dco();
\r
msp430_init_uart();
\r
\r
@@
-39,7
+43,7
@@
void handle(unsigned char app,
case SPI:
\r
spihandle(app,verb,len);
\r
break;
\r
case SPI:
\r
spihandle(app,verb,len);
\r
break;
\r
- case I2C:
\r
+ case I2C
APP
:
\r
i2chandle(app,verb,len);
\r
break;
\r
case CHIPCON:
\r
i2chandle(app,verb,len);
\r
break;
\r
case CHIPCON:
\r
@@
-48,11
+52,15
@@
void handle(unsigned char app,
case JTAG:
\r
jtaghandle(app,verb,len);
\r
break;
\r
case JTAG:
\r
jtaghandle(app,verb,len);
\r
break;
\r
- case JTAG430:
\r
- jtag430handle(app,verb,len);
\r
+ case JTAG430:
//Also JTAG430X, JTAG430X2
\r
+ jtag430
x2
handle(app,verb,len);
\r
break;
\r
default:
\r
break;
\r
default:
\r
+ #ifdef HANDLEOTHER
\r
+ HANDLEOTHER(app,verb,len);
\r
+ #else
\r
txdata(app,NOK,0);
\r
txdata(app,NOK,0);
\r
+ #endif
\r
break;
\r
}
\r
}
\r
break;
\r
}
\r
}
\r
@@
-65,9
+73,6
@@
int main(void)
\r
init();
\r
\r
\r
init();
\r
\r
-
\r
- //Ready
\r
- //txdata(MONITOR,OK,0);
\r
txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
\r
//Command loop. There's no end!
\r
txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
\r
//Command loop. There's no end!
\r