projects
/
goodfet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2644110
)
Monitor echo function, for better synchronization.
author
travisutk
<travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 20 May 2010 14:09:24 +0000
(14:09 +0000)
committer
travisutk
<travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 20 May 2010 14:09:24 +0000
(14:09 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@540
12e2690d
-a6be-4b82-a7b7-
67c4a43b65c8
firmware/apps/monitor/monitor.c
patch
|
blob
|
history
firmware/apps/radios/nrf.c
patch
|
blob
|
history
firmware/include/monitor.h
patch
|
blob
|
history
firmware/include/nrf.h
patch
|
blob
|
history
diff --git
a/firmware/apps/monitor/monitor.c
b/firmware/apps/monitor/monitor.c
index
3a94b44
..
218afca
100644
(file)
--- a/
firmware/apps/monitor/monitor.c
+++ b/
firmware/apps/monitor/monitor.c
@@
-22,6
+22,10
@@
void monitorhandle(unsigned char app,
default:
debugstr("ERROR: Command unsupported by debug monitor.");
break;
default:
debugstr("ERROR: Command unsupported by debug monitor.");
break;
+ case MONITOR_ECHO:
+ //Echo back the same buffer.
+ txdata(app,verb,len);
+ break;
case PEEK:
cmddata[0]=memorybyte[cmddataword[0]];
txdata(app,verb,1);
case PEEK:
cmddata[0]=memorybyte[cmddataword[0]];
txdata(app,verb,1);
diff --git
a/firmware/apps/radios/nrf.c
b/firmware/apps/radios/nrf.c
index
043675e
..
6f65e0b
100644
(file)
--- a/
firmware/apps/radios/nrf.c
+++ b/
firmware/apps/radios/nrf.c
@@
-96,7
+96,7
@@
void nrfhandle(unsigned char app,
//Raise !SS to end transaction, just in case we forgot.
P5OUT|=SS;
nrfsetup();
//Raise !SS to end transaction, just in case we forgot.
P5OUT|=SS;
nrfsetup();
-
+
switch(verb){
//PEEK and POKE might come later.
case READ:
switch(verb){
//PEEK and POKE might come later.
case READ:
diff --git
a/firmware/include/monitor.h
b/firmware/include/monitor.h
index
b36ceab
..
a4a3156
100644
(file)
--- a/
firmware/include/monitor.h
+++ b/
firmware/include/monitor.h
@@
-16,3
+16,21
@@
void monitor_ram_pattern();
//! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.
unsigned int monitor_ram_depth();
//! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.
unsigned int monitor_ram_depth();
+// Monitor Commands
+#define MONITOR_CHANGE_BAUD 0x80
+#define MONITOR_ECHO 0x81
+#define MONITOR_RAM_PATTERN 0x90
+#define MONITOR_RAM_DEPTH 0x91
+
+#define MONITOR_DIR 0xA0
+#define MONITOR_OUT 0xA1
+#define MONITOR_IN 0xA2
+
+#define MONITOR_SILENT 0xB0
+#define MONITOR_CONNECTED 0xB1
+
+#define MONITOR_READBUF 0xC0
+#define MONITOR_WRITEBUF 0xC1
+#define MONITOR_SIZEBUF 0xC2
+
+
diff --git
a/firmware/include/nrf.h
b/firmware/include/nrf.h
index
7abdf36
..
06805ae
100644
(file)
--- a/
firmware/include/nrf.h
+++ b/
firmware/include/nrf.h
@@
-9,8
+9,11
@@
#define NRF_RX 0x80
//Send a packet.
#define NRF_TX 0x81
#define NRF_RX 0x80
//Send a packet.
#define NRF_TX 0x81
-//Fl
su
h RX
+//Fl
us
h RX
#define NRF_RX_FLUSH 0x82
#define NRF_RX_FLUSH 0x82
+//Flush TX
+#define NRF_TX_FLUSH 0x83
+
//Nordic RF SPI Instructions
#define NRF_R_REGISTER 0x00
//Nordic RF SPI Instructions
#define NRF_R_REGISTER 0x00