]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Make McuSleepC smarter about newer msp430 processors.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Thu, 4 Sep 2008 22:03:11 +0000 (22:03 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Jul 2012 16:32:13 +0000 (10:32 -0600)
tos/chips/msp430/McuSleepC.nc

index 3d47fc5d1fca9d1d04b017a2709566073024cc97..57c6d393aaefcb522c22cc0738cb56df82d14e24 100644 (file)
@@ -69,10 +69,14 @@ implementation {
     if ((((TACCTL0 & CCIE) ||
          (TACCTL1 & CCIE) ||
          (TACCTL2 & CCIE)) &&
     if ((((TACCTL0 & CCIE) ||
          (TACCTL1 & CCIE) ||
          (TACCTL2 & CCIE)) &&
-        ((TACTL & TASSEL_3) == TASSEL_2)) ||
-       ((ME1 & (UTXE0 | URXE0)) && (U0TCTL & SSEL1)) ||
-       ((ME2 & (UTXE1 | URXE1)) && (U1TCTL & SSEL1))
-#ifdef __msp430_have_usart0_with_i2c
+        ((TACTL & TASSEL_3) == TASSEL_2))
+#ifdef __MSP430_HAS_UART0__
+       || ((ME1 & (UTXE0 | URXE0)) && (U0TCTL & SSEL1))
+#endif
+#ifdef __MSP430_HAS_UART1__
+       || ((ME2 & (UTXE1 | URXE1)) && (U1TCTL & SSEL1))
+#endif
+#ifdef __MSP430_HAS_I2C__
         // registers end in "nr" to prevent nesC race condition detection
         || ((U0CTLnr & I2CEN) && (I2CTCTLnr & SSEL1) &&
             (I2CDCTLnr & I2CBUSY) && (U0CTLnr & SYNC) && (U0CTLnr & I2C))
         // registers end in "nr" to prevent nesC race condition detection
         || ((U0CTLnr & I2CEN) && (I2CTCTLnr & SSEL1) &&
             (I2CDCTLnr & I2CBUSY) && (U0CTLnr & SYNC) && (U0CTLnr & I2C))
@@ -80,7 +84,7 @@ implementation {
        )
       pState = MSP430_POWER_LPM1;
     
        )
       pState = MSP430_POWER_LPM1;
     
-#ifdef __msp430_have_adc12
+#ifdef __MSP430_HAS_ADC12__
     // ADC12 check, pre-condition: pState != MSP430_POWER_ACTIVE
     if (ADC12CTL0 & ADC12ON){
       if (ADC12CTL1 & ADC12SSEL_2){
     // ADC12 check, pre-condition: pState != MSP430_POWER_ACTIVE
     if (ADC12CTL0 & ADC12ON){
       if (ADC12CTL1 & ADC12SSEL_2){