From: mmaroti Date: Wed, 9 Sep 2009 19:44:16 +0000 (+0000) Subject: Revert the SpiByte.write function to its original form till the SPI access bug is... X-Git-Tag: rc_6_tinyos_2_1_1~286 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=cb17f736919c7a258b50e26caad5b1c22c30fc1c Revert the SpiByte.write function to its original form till the SPI access bug is found --- diff --git a/tos/chips/atm128/spi/Atm128SpiP.nc b/tos/chips/atm128/spi/Atm128SpiP.nc index d457e42a..1838f7b0 100644 --- a/tos/chips/atm128/spi/Atm128SpiP.nc +++ b/tos/chips/atm128/spi/Atm128SpiP.nc @@ -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();