[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430 McuSleepC.nc, 1.2, 1.3 msp430hardware.h, 1.2, 1.3

Vlado Handziski vlahan at users.sourceforge.net
Tue Dec 12 10:24:11 PST 2006


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

Modified Files:
	McuSleepC.nc msp430hardware.h 
Log Message:
Swapping HEAD and DEVEL branches

Index: McuSleepC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/McuSleepC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** McuSleepC.nc	12 Jul 2006 17:01:39 -0000	1.2
--- McuSleepC.nc	12 Dec 2006 18:23:06 -0000	1.3
***************
*** 53,59 ****
  
    /* Note that the power values are maintained in an order
!    * based on their active components, NOT on their values.
!    * Look at atm128hardware.h and page 42 of the ATmeg128
!    * manual (figure 17).*/
    // NOTE: This table should be in progmem.
    const uint16_t msp430PowerBits[MSP430_POWER_LPM4 + 1] = {
--- 53,57 ----
  
    /* Note that the power values are maintained in an order
!    * based on their active components, NOT on their values.*/
    // NOTE: This table should be in progmem.
    const uint16_t msp430PowerBits[MSP430_POWER_LPM4 + 1] = {
***************
*** 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;
    }
--- 80,102 ----
  	)
        pState = MSP430_POWER_LPM1;
!     
! #ifdef __msp430_have_adc12
!     // ADC12 check, pre-condition: pState != MSP430_POWER_ACTIVE
!     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;
!       }
      }
+ #endif
+     
      return pState;
    }

Index: msp430hardware.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/msp430hardware.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** msp430hardware.h	12 Jul 2006 17:01:39 -0000	1.2
--- msp430hardware.h	12 Dec 2006 18:23:06 -0000	1.3
***************
*** 124,127 ****
--- 124,138 ----
  #endif
  
+ // define platform constants that can be changed for different compilers
+ // these are all msp430-gcc specific (add as necessary)
+ 
+ #ifdef __msp430_headers_adc10_h
+ #define __msp430_have_adc10
+ #endif
+ 
+ #ifdef __msp430_headers_adc12_h
+ #define __msp430_have_adc12
+ #endif
+ 
  // I2CBusy flag is not defined by current MSP430-GCC
  #ifdef __msp430_have_usart0_with_i2c



More information about the Tinyos-2-commits mailing list