[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430 McuSleepC.nc, 1.1.2.3, 1.1.2.4

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Mon Nov 20 06:50:20 PST 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	McuSleepC.nc 
Log Message:
Adapted the ADC check to the changed ADC implementation (new ADC interface Msp430Adc12MultiChannel).

Index: McuSleepC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/McuSleepC.nc,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** McuSleepC.nc	19 Jun 2006 11:12:23 -0000	1.1.2.3
--- McuSleepC.nc	20 Nov 2006 14:50:18 -0000	1.1.2.4
***************
*** 82,99 ****
  	)
        pState = MSP430_POWER_LPM1;
!     // ADC12 check
!     if (ADC12CTL1 & ADC12BUSY){
!       if (!(ADC12CTL0 & MSC) && ((TACTL & TASSEL_3) == TASSEL_2))
! 	pState = MSP430_POWER_LPM1;
!       else
!         switch (ADC12CTL1 & ADC12SSEL_3) {
! 	case ADC12SSEL_2:
! 	  pState = MSP430_POWER_ACTIVE;
! 	  break;
! 	case ADC12SSEL_3:
! 	  pState = MSP430_POWER_LPM1;
! 	  break;
!         }
      }
      return pState;
    }
--- 82,102 ----
  	)
        pState = MSP430_POWER_LPM1;
!     
!     // ADC12 check: 
!     if (ADC12CTL0 & ADC12ON){
!       if (ADC12CTL1 & ADC12SSEL_2){
!         // sample or conversion operation with MCLK or SMCLK
!         if (ADC12CTL1 & ADC12SSEL_1)
!           pState = MSP430_POWER_LPM1;
!         else
!           pState = MSP430_POWER_ACTIVE;
!       } else if ((ADC12CTL1 & SHS0) && ((TACTL & TASSEL_3) == TASSEL_2)){
!         // Timer A is used as sample-and-hold source and SMCLK sources Timer A
!         // (Timer A interrupts are always disabled when it is used by the 
!         // ADC subsystem, that's why the Timer check above is not enough)
! 	      pState = MSP430_POWER_LPM1;
!       }
      }
+     
      return pState;
    }



More information about the Tinyos-2-commits mailing list