[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/timer
HalPXA27xSleepM.nc, 1.1.2.3, 1.1.2.4
Philip Buonadonna
philipb at users.sourceforge.net
Fri Nov 10 11:12:25 PST 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/timer
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv1649/timer
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
HalPXA27xSleepM.nc
Log Message:
Added ability to go to deep sleep for long periods
Index: HalPXA27xSleepM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/timer/HalPXA27xSleepM.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
*** HalPXA27xSleepM.nc 18 Oct 2006 19:29:35 -0000 1.1.2.3
--- HalPXA27xSleepM.nc 10 Nov 2006 19:12:23 -0000 1.1.2.4
***************
*** 44,48 ****
implementation {
! void doSleep(uint32_t swRegVal) {
int i;
call HplPXA27xPower.setPWER(PWER_WERTC);
--- 44,48 ----
implementation {
! void doSleep(uint32_t swRegVal, bool useDeepSleep) {
int i;
call HplPXA27xPower.setPWER(PWER_WERTC);
***************
*** 55,60 ****
for(i = 0; i < 5000; i++); // spin for a bit
! call HplPXA27xPower.setPWRMode(PWRMODE_M_SLEEP);
// this call never returns
}
--- 55,66 ----
for(i = 0; i < 5000; i++); // spin for a bit
! if (useDeepSleep) {
! call HplPXA27xPower.setPWRMode(PWRMODE_M_DEEPSLEEP);
! // this call never returns
! }
! else {
! call HplPXA27xPower.setPWRMode(PWRMODE_M_SLEEP);
// this call never returns
+ }
}
More information about the Tinyos-2-commits
mailing list