[Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/iris/chips/rf230 HplRF2xxC.nc, 1.1, 1.2 HplRF2xxP.nc, 1.1, 1.2

Miklos Maroti mmaroti at users.sourceforge.net
Mon Mar 9 11:13:29 PDT 2009


Update of /cvsroot/tinyos/tinyos-2.x/tos/platforms/iris/chips/rf230
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12762

Modified Files:
	HplRF2xxC.nc HplRF2xxP.nc 
Log Message:
make the FastSpiByte interface generic and implement it in Atm128Spi

Index: HplRF2xxC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/iris/chips/rf230/HplRF2xxC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HplRF2xxC.nc	8 Mar 2009 23:23:19 -0000	1.1
--- HplRF2xxC.nc	9 Mar 2009 18:13:27 -0000	1.2
***************
*** 50,55 ****
  	components Atm128SpiC as SpiC;
  	SpiResource = SpiC.Resource[unique("Atm128SpiC.Resource")];
! 
! 	FastSpiByte = HplRF2xxP;
  
  	components HplAtm128GeneralIOC as IO;
--- 50,54 ----
  	components Atm128SpiC as SpiC;
  	SpiResource = SpiC.Resource[unique("Atm128SpiC.Resource")];
! 	FastSpiByte = SpiC;
  
  	components HplAtm128GeneralIOC as IO;

Index: HplRF2xxP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/iris/chips/rf230/HplRF2xxP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HplRF2xxP.nc	8 Mar 2009 23:23:19 -0000	1.1
--- HplRF2xxP.nc	9 Mar 2009 18:13:27 -0000	1.2
***************
*** 30,35 ****
  		interface GpioCapture as IRQ;
  		interface Init as PlatformInit;
- 
- 		interface FastSpiByte;
  	}
  
--- 30,33 ----
***************
*** 84,125 ****
  		call Capture.stop();
  	}
- 
- 	inline async command void FastSpiByte.splitWrite(uint8_t data)
- 	{
- 		// the SPI must have been started, so do not waste time here
- 		// SET_BIT(SPCR, SPE);
- 
- 		SPDR = data;
- 	}
- 
- 	inline async command uint8_t FastSpiByte.splitRead()
- 	{
- 	    while( !( SPSR & 0x80 ) )
- 			;
- 		return SPDR;
- 	}
- 
- 	inline async command uint8_t FastSpiByte.splitReadWrite(uint8_t data)
- 	{
- 		uint8_t b;
- 
- 	    while( !( SPSR & 0x80 ) )
- 			;
- 		b = SPDR;
- 		SPDR = data;
- 
- 		return b;
- 	}
- 
- 	inline async command uint8_t FastSpiByte.write(uint8_t data)
- 	{
- 		// the SPI must have been started, so do not waste time here
- 		// SET_BIT(SPCR, SPE);
- 
- 		SPDR = data;
- 	    while( !( SPSR & 0x80 ) )
- 			;
- 
- 		return SPDR;
- 	}
  }
--- 82,84 ----



More information about the Tinyos-2-commits mailing list