projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved TXFLUSH strobe from Python to C in CC2420 driver.
[goodfet]
/
firmware
/
apps
/
radios
/
ccspi.c
diff --git
a/firmware/apps/radios/ccspi.c
b/firmware/apps/radios/ccspi.c
index
f47e54c
..
377a5f0
100644
(file)
--- a/
firmware/apps/radios/ccspi.c
+++ b/
firmware/apps/radios/ccspi.c
@@
-199,16
+199,6
@@
void ccspi_handle_fn( uint8_t const app,
case CCSPI_TX:
#ifdef FIFOP
case CCSPI_TX:
#ifdef FIFOP
- /* //Has there been an overflow?
- if(ccspi_status()&BIT5){
- debugstr("Clearing underflow");
- CLRSS;
- ccspitrans8(0x09); //SFLUSHTX
- SETSS;
- }
- */
-
-
//Wait for last packet to TX.
//while(ccspi_status()&BIT3);
//Wait for last packet to TX.
//while(ccspi_status()&BIT3);
@@
-224,6
+214,14
@@
void ccspi_handle_fn( uint8_t const app,
ccspitrans8(0x04); //STXON
SETSS;
ccspitrans8(0x04); //STXON
SETSS;
+ //Wait for the pulse on SFD, after which the packet has been sent.
+ while(!SFD);
+ while(SFD);
+
+ //Flush TX buffer.
+ CLRSS;
+ ccspitrans8(0x09); //SFLUSHTX
+ SETSS;
txdata(app,verb,0);
#else
txdata(app,verb,0);
#else