X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=firmware%2Fapps%2Fradios%2Fccspi.c;h=6fdea296507834198874d34ee64a7b8ae2ab947a;hb=d85d45d823dda71280f4ed9083717ec8e5ce28ae;hp=e1cb9bb8cdf7bafee225f1a0439484dddaf25700;hpb=5e2476a1d3fe898f77f6bca399bbff63bb420a2d;p=goodfet diff --git a/firmware/apps/radios/ccspi.c b/firmware/apps/radios/ccspi.c index e1cb9bb..6fdea29 100644 --- a/firmware/apps/radios/ccspi.c +++ b/firmware/apps/radios/ccspi.c @@ -1,6 +1,11 @@ /*! \file ccspi.c \author Travis Goodspeed \brief Chipcon SPI Register Interface + + Unfortunately, there is very little similarity between the CC2420 + and the CC2500, to name just two of the myriad of Chipcon SPI + radios. Auto-detection will be a bit difficult, but more to the + point, all high level functionality must be moved into the client. */ //Higher level left to client application. @@ -128,7 +133,7 @@ void ccspihandle(unsigned char app, RADIOPASSIVE; //Get the packet. CLRSS; - ccspitrans8(CCSPI_R_RX_PAYLOAD); + ccspitrans8(CCSPI_RXFIFO); for(i=0;i<32;i++) cmddata[i]=ccspitrans8(0xde); SETSS; @@ -138,7 +143,7 @@ void ccspihandle(unsigned char app, case CCSPI_RX_FLUSH: //Flush the buffer. CLRSS; - ccspitrans8(CCSPI_FLUSH_RX); + ccspitrans8(CCSPI_SFLUSHRX); SETSS; //Return the packet.