projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better transmit function for CCSPI.
[goodfet]
/
firmware
/
apps
/
radios
/
ccspi.c
diff --git
a/firmware/apps/radios/ccspi.c
b/firmware/apps/radios/ccspi.c
index
8a8d7e8
..
a578c92
100644
(file)
--- a/
firmware/apps/radios/ccspi.c
+++ b/
firmware/apps/radios/ccspi.c
@@
-357,6
+357,12
@@
void ccspi_handle_fn( uint8_t const app,
//Wait for last packet to TX.
//while(ccspi_status()&BIT3);
//Wait for last packet to TX.
//while(ccspi_status()&BIT3);
+
+ //Flush TX buffer.
+ CLRSS;
+ ccspitrans8(0x09); //SFLUSHTX
+ SETSS;
+
//Load the packet.
CLRSS;
//Load the packet.
CLRSS;
@@
-373,12
+379,7
@@
void ccspi_handle_fn( uint8_t const app,
//Wait for the pulse on SFD, after which the packet has been sent.
while(!SFD);
while(SFD);
//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
debugstr("Can't TX a packet with SFD and FIFOP definitions.");
txdata(app,verb,0);
#else
debugstr("Can't TX a packet with SFD and FIFOP definitions.");