]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Revert the SpiByte.write function to its original form till the SPI access bug is...
authormmaroti <mmaroti>
Wed, 9 Sep 2009 19:44:16 +0000 (19:44 +0000)
committermmaroti <mmaroti>
Wed, 9 Sep 2009 19:44:16 +0000 (19:44 +0000)
tos/chips/atm128/spi/Atm128SpiP.nc

index d457e42a7ce9847e932b08450bc98c315d66dd0d..1838f7b0d00a48c6a76858b0341c825ebeca97d7 100644 (file)
@@ -126,10 +126,14 @@ implementation {
   }
 
   async command uint8_t SpiByte.write( uint8_t tx ) {
-    /* no need to enable the SPI bus since that must have been done 
-       when the resource was granted */
-    // call Spi.enableSpi(TRUE);
-    // call McuPowerState.update();
+    /* There is no need to enable the SPI bus and update the power state
+       here since that must have been done when the resource was granted. 
+       However there seems to be a bug somewhere in the radio driver for 
+       the MicaZ platform so we cannot remove the following two lines 
+       before that problem is resolved. (Miklos Maroti) */
+    call Spi.enableSpi(TRUE);
+    call McuPowerState.update();
+
     call Spi.write( tx );
     while ( !( SPSR & 0x80 ) );
     return call Spi.read();