[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/atm128/i2c Atm128I2CMasterPacketP.nc, 1.4, 1.5

Phil Levis scipio at users.sourceforge.net
Mon Oct 1 12:19:41 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128/i2c
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26041

Modified Files:
	Atm128I2CMasterPacketP.nc 
Log Message:
Assume 7-bit address is right-aligned.


Index: Atm128I2CMasterPacketP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Atm128I2CMasterPacketP.nc	12 Dec 2006 18:23:03 -0000	1.4
--- Atm128I2CMasterPacketP.nc	1 Oct 2007 19:19:39 -0000	1.5
***************
*** 323,330 ****
        if (state == I2C_ADDR) {
  	if (reading == TRUE) {
! 	  call I2C.write((packetAddr & 0xff) | ATM128_I2C_SLA_READ);
  	}
  	else
! 	  call I2C.write((packetAddr & 0xff) | ATM128_I2C_SLA_WRITE);
  	state = I2C_DATA;
  	call I2C.sendCommand();
--- 323,330 ----
        if (state == I2C_ADDR) {
  	if (reading == TRUE) {
! 	  call I2C.write(((packetAddr & 0x7f) << 1)) | ATM128_I2C_SLA_READ);
  	}
  	else
! 	  call I2C.write(((packetAddr & 0x7f) << 1)) | ATM128_I2C_SLA_WRITE);
  	state = I2C_DATA;
  	call I2C.sendCommand();



More information about the Tinyos-2-commits mailing list