[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/adc12 AdcC.nc, 1.1.2.13, 1.1.2.14

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Sat Jul 1 11:26:06 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	AdcC.nc 
Log Message:
SID interfaces return left-aligned data, all ADC readings need to be postprocessed with << 4

Index: AdcC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/adc12/Attic/AdcC.nc,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -C2 -d -r1.1.2.13 -r1.1.2.14
*** AdcC.nc	19 Jun 2006 11:12:23 -0000	1.1.2.13
--- AdcC.nc	1 Jul 2006 18:26:04 -0000	1.1.2.14
***************
*** 129,133 ****
    {
      call Resource.release[owner]();
!     signal Read.readDone[owner](SUCCESS, value);
    }
  
--- 129,133 ----
    {
      call Resource.release[owner]();
!     signal Read.readDone[owner](SUCCESS, (value << 4));
    }
  
***************
*** 140,144 ****
        post readDone();
      } else { // was ReadNow.read request
!       signal ReadNow.readDone[client](SUCCESS, data);
      }
      return SUCCESS;
--- 140,144 ----
        post readDone();
      } else { // was ReadNow.read request
!       signal ReadNow.readDone[client](SUCCESS, (data << 4));
      }
      return SUCCESS;
***************
*** 228,233 ****
--- 228,236 ----
    {
      error_t nextRequest;
+     uint16_t i;
      
      if (!resultBuf){
+       for (i=0; i<length/2; i++)
+         buf[i] = (buf[i] << 4);
        value = length;
        resultBuf = buf;



More information about the Tinyos-2-commits mailing list