[Tinyos-beta-commits] CVS: tinyos-1.x/beta/chips/AD524X AD524XM.nc, 1.1, 1.2

Joe Polastre jpolastre at users.sourceforge.net
Tue Feb 1 09:26:35 PST 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/chips/AD524X
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27028

Modified Files:
	AD524XM.nc 
Log Message:
i was trying to be fancy when I didn't need to be; resulted in a bug
that is fixed here.


Index: AD524XM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/chips/AD524X/AD524XM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AD524XM.nc	1 Feb 2005 05:05:09 -0000	1.1
--- AD524XM.nc	1 Feb 2005 17:26:33 -0000	1.2
***************
*** 80,84 ****
    result_t startWriteCommand(uint8_t _addr, uint8_t _length, uint16_t _data, uint8_t _newstate) {
      uint8_t _state = 0;
-     uint16_t* _data16 = (uint16_t*)data;
  
      atomic {
--- 80,83 ----
***************
*** 89,93 ****
  
      if (_state == IDLE) {
!       _data16[0] = _data;
        if (!call I2CPacket.writePacket((_addr & 0x03) | 0x2C, _length, data)) {
  	state = IDLE;
--- 88,93 ----
  
      if (_state == IDLE) {
!       data[0] = _data & 0xFF;
!       data[1] = (_data >> 8) & 0xFF;
        if (!call I2CPacket.writePacket((_addr & 0x03) | 0x2C, _length, data)) {
  	state = IDLE;



More information about the Tinyos-beta-commits mailing list