]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
MSP430 low power state defaults to LPM4, timer system overrides to
authorscipio <scipio>
Tue, 7 Jul 2009 18:53:40 +0000 (18:53 +0000)
committerscipio <scipio>
Tue, 7 Jul 2009 18:53:40 +0000 (18:53 +0000)
LPM3.

tos/chips/msp430/McuSleepC.nc
tos/chips/msp430/timer/Msp430ClockC.nc
tos/chips/msp430/timer/Msp430ClockP.nc

index 504e9add33adeaf1a387e331cabab971eb2d9079..3d47fc5d1fca9d1d04b017a2709566073024cc97 100644 (file)
@@ -64,7 +64,7 @@ implementation {
   };
     
   mcu_power_t getPowerState() {
-    mcu_power_t pState = MSP430_POWER_LPM3;
+    mcu_power_t pState = MSP430_POWER_LPM4;
     // TimerA, USART0, USART1 check
     if ((((TACCTL0 & CCIE) ||
          (TACCTL1 & CCIE) ||
index 5249fbe0ac6ba1f8de65d0e52ae6788ecc08ed22..7feab6ab025890a8b12bc76561e37ff99c1ba3e8 100644 (file)
@@ -30,9 +30,10 @@ configuration Msp430ClockC
 }
 implementation
 {
-  components Msp430ClockP, Msp430TimerC;
+  components Msp430ClockP, Msp430TimerC, McuSleepC;
 
   Init = Msp430ClockP;
   Msp430ClockInit = Msp430ClockP;
+  McuSleepC.McuPowerOverride -> Msp430ClockP;
 }
 
index 55aaba33203581bdff602e1b62d393355f5fe05b..689175de7ae82a057be0d9f56a7566805de32d6f 100644 (file)
@@ -33,6 +33,7 @@ module Msp430ClockP @safe()
 {
   provides interface Init;
   provides interface Msp430ClockInit;
+  provides interface McuPowerOverride;
 }
 implementation
 {
@@ -48,6 +49,9 @@ implementation
     TARGET_DCO_DELTA = (TARGET_DCO_KHZ / ACLK_KHZ) * ACLK_CALIB_PERIOD,
   };
 
+  async command mcu_power_t McuPowerOverride.lowestState() {
+    return MSP430_POWER_LPM3;
+  }
 
   command void Msp430ClockInit.defaultSetupDcoCalibrate()
   {