]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/rf212/RF212DriverLayerP.nc
Apply bug fixes related to BLIP submitted by Lars Schor
[tinyos-2.x.git] / tos / chips / rf2xx / rf212 / RF212DriverLayerP.nc
index 1df169a2b5207cf1f7d5e242d8aad351018ad607..a2ac7dea3baed0cfcb9f219c03cc5c340a57b846 100644 (file)
@@ -24,7 +24,7 @@
 #include <RF212DriverLayer.h>
 #include <Tasklet.h>
 #include <RadioAssert.h>
-#include <GenericTimeSyncMessage.h>
+#include <TimeSyncMessageLayer.h>
 #include <RadioConfig.h>
 
 module RF212DriverLayerP
@@ -492,10 +492,8 @@ implementation
                if( timesync != 0 )
                        *(timesync_relative_t*)timesync = (*(timesync_absolute_t*)timesync) - time32;
 
-               do {
+               while( length-- != 0 )
                        call FastSpiByte.splitReadWrite(*(data++));
-               }
-               while( --length != 0 );
 
                // wait for the SPI transfer to finish
                call FastSpiByte.splitRead();