From: travisutk Date: Sun, 25 Dec 2011 23:29:21 +0000 (+0000) Subject: Better transmit function for CCSPI. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=f22686562a6c161be8a8c58bd83e46fa0c7ae1e8 Better transmit function for CCSPI. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1075 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/apps/radios/ccspi.c b/firmware/apps/radios/ccspi.c index 8a8d7e8..a578c92 100644 --- 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); + + //Flush TX buffer. + CLRSS; + ccspitrans8(0x09); //SFLUSHTX + SETSS; + //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); - - //Flush TX buffer. - CLRSS; - ccspitrans8(0x09); //SFLUSHTX - SETSS; - + txdata(app,verb,0); #else debugstr("Can't TX a packet with SFD and FIFOP definitions.");