projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a GLITCHTIME verb (0x82) for timing the execution of a verb.
[goodfet]
/
firmware
/
goodfet.c
diff --git
a/firmware/goodfet.c
b/firmware/goodfet.c
index
744aa9d
..
2fe74e1
100644
(file)
--- a/
firmware/goodfet.c
+++ b/
firmware/goodfet.c
@@
-10,7
+10,7
@@
#include "platform.h"
\r
#include "command.h"
\r
#include "apps.h"
\r
#include "platform.h"
\r
#include "command.h"
\r
#include "apps.h"
\r
-
\r
+#include "glitch.h"
\r
\r
\r
//LED on P1.0
\r
\r
\r
//LED on P1.0
\r
@@
-28,6
+28,11
@@
void init(){
msp430_init_dco();
\r
msp430_init_uart();
\r
\r
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
//Enable Interrupts.
\r
//eint();
\r
}
\r
@@
-38,7
+43,11
@@
void handle(unsigned char app,
unsigned char verb,
\r
unsigned long len){
\r
//debugstr("GoodFET");
\r
unsigned char verb,
\r
unsigned long len){
\r
//debugstr("GoodFET");
\r
+ P1OUT&=~1;
\r
switch(app){
\r
switch(app){
\r
+ case GLITCH:
\r
+ glitchhandle(app,verb,len);
\r
+ break;
\r
case MONITOR:
\r
monitorhandle(app,verb,len);
\r
break;
\r
case MONITOR:
\r
monitorhandle(app,verb,len);
\r
break;
\r
@@
-65,9
+74,9
@@
void handle(unsigned char app,
pluginhandle(app,verb,len);
\r
}else{
\r
debugstr("Plugin missing.");
\r
pluginhandle(app,verb,len);
\r
}else{
\r
debugstr("Plugin missing.");
\r
+ debughex(app);
\r
txdata(app,NOK,0);
\r
}
\r
txdata(app,NOK,0);
\r
}
\r
-
\r
break;
\r
}
\r
}
\r
break;
\r
}
\r
}
\r
@@
-80,9
+89,10
@@
int main(void)
unsigned long len;
\r
\r
init();
\r
unsigned long len;
\r
\r
init();
\r
-
\r
+
\r
txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
\r
txstring(MONITOR,OK,"http://goodfet.sf.net/");
\r
\r
+
\r
//Command loop. There's no end!
\r
while(1){
\r
//Magic 3
\r
//Command loop. There's no end!
\r
while(1){
\r
//Magic 3
\r