[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart Msp430SpiDmaP.nc, 1.1.2.5, 1.1.2.6 Msp430SpiNoDmaP.nc, 1.1.2.5, 1.1.2.6

Jonathan Hui jwhui at users.sourceforge.net
Thu Sep 28 12:26:24 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/usart
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30064/chips/msp430/usart

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	Msp430SpiDmaP.nc Msp430SpiNoDmaP.nc 
Log Message:

Changes to SpiByte interface. Return received byte since error_t is no
longer returned.



Index: Msp430SpiDmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/usart/Msp430SpiDmaP.nc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** Msp430SpiDmaP.nc	15 Aug 2006 11:59:08 -0000	1.1.2.5
--- Msp430SpiDmaP.nc	28 Sep 2006 19:26:21 -0000	1.1.2.6
***************
*** 102,110 ****
    default event void Resource.granted[ uint8_t id ]() {}
  
!   async command void SpiByte.write( uint8_t tx, uint8_t* rx ) {
  
      call Usart.tx( tx );
      while( !call Usart.isRxIntrPending() );
!     *rx = call Usart.rx();
  
    }
--- 102,110 ----
    default event void Resource.granted[ uint8_t id ]() {}
  
!   async command uint8_t SpiByte.write( uint8_t tx ) {
  
      call Usart.tx( tx );
      while( !call Usart.isRxIntrPending() );
!     return call Usart.rx();
  
    }

Index: Msp430SpiNoDmaP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/usart/Msp430SpiNoDmaP.nc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** Msp430SpiNoDmaP.nc	15 Aug 2006 11:59:08 -0000	1.1.2.5
--- Msp430SpiNoDmaP.nc	28 Sep 2006 19:26:21 -0000	1.1.2.6
***************
*** 93,102 ****
    }
  
!   async command void SpiByte.write( uint8_t tx, uint8_t* rx ) {
      call Usart.disableRxIntr();
      call Usart.tx( tx );
      while( !call Usart.isRxIntrPending() );
!     *rx = call Usart.rx();
      call Usart.enableRxIntr();
    }
  
--- 93,104 ----
    }
  
!   async command uint8_t SpiByte.write( uint8_t tx ) {
!     uint8_t byte;
      call Usart.disableRxIntr();
      call Usart.tx( tx );
      while( !call Usart.isRxIntrPending() );
!     byte = call Usart.rx();
      call Usart.enableRxIntr();
+     return byte;
    }
  



More information about the Tinyos-2-commits mailing list