[Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/PowerMgmt
PowerMgmt.h, 1.4, 1.5 PowerMgmtM.nc, 1.8, 1.9
Gilman Tolle
gtolle at users.sourceforge.net
Thu Oct 14 21:59:12 PDT 2004
Update of /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/PowerMgmt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10212
Modified Files:
PowerMgmt.h PowerMgmtM.nc
Log Message:
Added ability to specify sleep delay remotely
Index: PowerMgmt.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/PowerMgmt/PowerMgmt.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PowerMgmt.h 7 Sep 2004 23:32:22 -0000 1.4
--- PowerMgmt.h 15 Oct 2004 04:59:10 -0000 1.5
***************
*** 14,17 ****
--- 14,18 ----
typedef struct PowerMgmtCmdMsg {
+ uint16_t changeDelay;
uint8_t powerMode;
} PowerMgmtCmdMsg;
Index: PowerMgmtM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/PowerMgmt/PowerMgmtM.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PowerMgmtM.nc 21 Sep 2004 03:57:53 -0000 1.8
--- PowerMgmtM.nc 15 Oct 2004 04:59:10 -0000 1.9
***************
*** 90,97 ****
call softStart();
call ComponentControl.start();
! call PowerChangeTimer.start(TIMER_ONE_SHOT, LPL_CHANGE_DELAY);
break;
case POWERMGMT_LPL:
break;
case POWERMGMT_SLEEP:
#ifdef DBG_POWERMGMT
--- 90,101 ----
call softStart();
call ComponentControl.start();
! call PowerChangeTimer.start(TIMER_ONE_SHOT,
! (cmdMsg->changeDelay == 0 ?
! LPL_CHANGE_DELAY : cmdMsg->changeDelay));
break;
+
case POWERMGMT_LPL:
break;
+
case POWERMGMT_SLEEP:
#ifdef DBG_POWERMGMT
***************
*** 99,104 ****
sleepTime = theTime.low32;
#endif
! // call Leds.redOn();
! call PowerChangeTimer.start(TIMER_ONE_SHOT, LPL_SLEEP_DELAY);
break;
case POWERMGMT_HIBERNATE:
--- 103,109 ----
sleepTime = theTime.low32;
#endif
! call PowerChangeTimer.start(TIMER_ONE_SHOT,
! (cmdMsg->changeDelay == 0 ?
! LPL_SLEEP_DELAY : cmdMsg->changeDelay));
break;
case POWERMGMT_HIBERNATE:
***************
*** 174,184 ****
NamingMsg *namingMsg = (NamingMsg*) pData;
/* Drop into long-preamble mode to retransmit a wakeup msg */
if (cmdMsgCache.powerMode == POWERMGMT_ON) {
- #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
atomic call SetListeningMode(CC1K_LPL);
- #endif
call PowerChangeTimer.start(TIMER_ONE_SHOT, LPL_CHANGE_RETRY_DELAY);
}
memcpy(namingMsg, &namingMsgCache, sizeof(namingMsgCache));
--- 179,189 ----
NamingMsg *namingMsg = (NamingMsg*) pData;
+ #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_XSM)
/* Drop into long-preamble mode to retransmit a wakeup msg */
if (cmdMsgCache.powerMode == POWERMGMT_ON) {
atomic call SetListeningMode(CC1K_LPL);
call PowerChangeTimer.start(TIMER_ONE_SHOT, LPL_CHANGE_RETRY_DELAY);
}
+ #endif
memcpy(namingMsg, &namingMsgCache, sizeof(namingMsgCache));
More information about the Tinyos-beta-commits
mailing list