projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dropped ugly 'blocks' kludge for a 16-bit length field.
[goodfet]
/
firmware
/
apps
/
monitor
/
monitor.c
diff --git
a/firmware/apps/monitor/monitor.c
b/firmware/apps/monitor/monitor.c
index
78aaa91
..
3f35ea2
100644
(file)
--- a/
firmware/apps/monitor/monitor.c
+++ b/
firmware/apps/monitor/monitor.c
@@
-1,3
+1,8
@@
+/*! \file monitor.c
+ \author Travis Goodspeed
+ \brief Local debug monitor.
+*/
+
#include "command.h"
#include "platform.h"
#include "monitor.h"
#include "command.h"
#include "platform.h"
#include "monitor.h"
@@
-5,7
+10,7
@@
//! Handles a monitor command.
void monitorhandle(unsigned char app,
unsigned char verb,
//! Handles a monitor command.
void monitorhandle(unsigned char app,
unsigned char verb,
- unsigned
char
len){
+ unsigned
long
len){
switch(verb){
case PEEK:
cmddata[0]=memorybyte[cmddataword[0]];
switch(verb){
case PEEK:
cmddata[0]=memorybyte[cmddataword[0]];
@@
-17,6
+22,11
@@
void monitorhandle(unsigned char app,
cmddata[0]=memorybyte[cmddataword[0]];
txdata(app,verb,1);
break;
cmddata[0]=memorybyte[cmddataword[0]];
txdata(app,verb,1);
break;
+ case MONITOR_SIZEBUF:
+ //TODO make the data length target-specific, varying by ram.
+ cmddataword[0]=0x100;
+ txdata(app,verb,2);
+ break;
case MONITOR_CHANGE_BAUD:
//This command, and ONLY this command, does not reply.
setbaud(cmddata[0]);
case MONITOR_CHANGE_BAUD:
//This command, and ONLY this command, does not reply.
setbaud(cmddata[0]);
@@
-29,6
+39,22
@@
void monitorhandle(unsigned char app,
cmddataword[0]=monitor_ram_depth();
txdata(app,verb,2);
break;
cmddataword[0]=monitor_ram_depth();
txdata(app,verb,2);
break;
+ case MONITOR_DIR:
+ P5DIR=cmddata[0];
+ txdata(app,verb,1);
+ break;
+ case MONITOR_IN:
+ cmddata[0]=P5IN;
+ txdata(app,verb,1);
+ break;
+ case MONITOR_OUT:
+ P5OUT=cmddata[0];
+ txdata(app,verb,1);
+ break;
+ case MONITOR_SILENT:
+ silent=cmddata[0];
+ txdata(app,verb,1);
+ break;
}
}
}
}