]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Razvan and Jeonggil Ko found a problem with the status byte return value on RAM opera...
authorrincon <rincon>
Wed, 7 Nov 2007 22:22:01 +0000 (22:22 +0000)
committerrincon <rincon>
Wed, 7 Nov 2007 22:22:01 +0000 (22:22 +0000)
tos/chips/cc2420/spi/CC2420SpiP.nc

index cdc2df9363e95232c469c68607b29faf1b5e064d..6db6a4ed3a9170eedb2f8681f03779d5caa88765 100644 (file)
@@ -33,6 +33,8 @@
  * @author Jonathan Hui <jhui@archrock.com>
  * @author David Moss
  * @author Roman Lim
+ * @author Razvan Musaloie-E.
+ * @author Jeonggil Ko
  * @version $Revision$ $Date$
  */
 
@@ -244,8 +246,8 @@ implementation {
     
     addr += offset;
 
-    call SpiByte.write( addr | 0x80 );
-    status = call SpiByte.write( ( ( addr >> 1 ) & 0xc0 ) | 0x20 );
+    status = call SpiByte.write( addr | 0x80 );
+    call SpiByte.write( ( ( addr >> 1 ) & 0xC0 ) | 0x20 );
     for ( ; len; len-- ) {
       *data++ = call SpiByte.write( 0 );
     }
@@ -269,10 +271,10 @@ implementation {
     
     addr += offset;
 
-    call SpiByte.write( addr | 0x80 );
+    status = call SpiByte.write( addr | 0x80 );
     call SpiByte.write( ( addr >> 1 ) & 0xc0 );
     for ( ; len; len-- ) {
-      status = call SpiByte.write( *data++ );
+      call SpiByte.write( *data++ );
     }
 
     return status;