[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/timer
HalPXA27xWatchdog.nc, 1.1.2.1, 1.1.2.2 HalPXA27xWatchdogM.nc,
1.1.2.1, 1.1.2.2
Philip Buonadonna
philipb at users.sourceforge.net
Thu Jul 20 17:28:49 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/timer
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25920
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
HalPXA27xWatchdog.nc HalPXA27xWatchdogM.nc
Log Message:
Updated watchdog HAL components.
Index: HalPXA27xWatchdog.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/timer/Attic/HalPXA27xWatchdog.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** HalPXA27xWatchdog.nc 17 Jul 2006 18:23:23 -0000 1.1.2.1
--- HalPXA27xWatchdog.nc 21 Jul 2006 00:28:47 -0000 1.1.2.2
***************
*** 36,40 ****
interface HalPXA27xWatchdog {
! async command void enable();
! async command void tickle(uint32_t time);
}
--- 36,58 ----
interface HalPXA27xWatchdog {
!
! /**
! * Enable the watchdog resource with the given timeout interval.
! * This function may be called multiple times to reset the timeout
! * interval. However, the watchdog function itself is sticky and
! * will remain enabled until system reset.
! *
! * @param interva The timeout interval in untis of 3.25MHZ clock cycle
! * ticks.
! *
! */
! async command void enable(uint32_t interval);
!
! /**
! * Tickle/reset the watchdog counter. This function must be
! * called on a regular basis to prevent the watchdog from resetting the
! * system.
! *
! */
! async command void tickle();
}
Index: HalPXA27xWatchdogM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/timer/Attic/HalPXA27xWatchdogM.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** HalPXA27xWatchdogM.nc 17 Jul 2006 18:23:23 -0000 1.1.2.1
--- HalPXA27xWatchdogM.nc 21 Jul 2006 00:28:47 -0000 1.1.2.2
***************
*** 42,58 ****
implementation {
! async command void HalPXA27xWatchdogM.enable() {
! atomic call HplPXA27xOSTimerWatchdog.enableWatchdog();
}
! async command void HalPXA27xWatchdogM.tickle(uint32_t time) {
uint32_t curMatch;
-
atomic {
! curMatch = call HplPXA27xOSTimer.getOSMR();
! curMatch = (curMatch + time) % 0xFFFFFFFF;
call HplPXA27xOSTimer.setOSMR(curMatch);
}
}
async event void HplPXA27xOSTimer.fired() {}
}
--- 42,69 ----
implementation {
! uint32_t gResetInterval;
!
! async command void HalPXA27xWatchdog.enable(uint32_t interval) {
! uint32_t curMatch;
! atomic {
! gResetInterval = interval;
! curMatch = call HplPXA27xOSTimer.getOSCR();
! curMatch = (curMatch + gResetInterval) % 0xFFFFFFFF;
! call HplPXA27xOSTimer.setOSMR(curMatch);
! call HplPXA27xOSTimerWatchdog.enableWatchdog();
! }
}
! async command void HalPXA27xWatchdog.tickle() {
uint32_t curMatch;
atomic {
! curMatch = call HplPXA27xOSTimer.getOSCR();
! curMatch = (curMatch + gResetInterval) % 0xFFFFFFFF;
call HplPXA27xOSTimer.setOSMR(curMatch);
}
}
+
+ // This won't ever get called. Rather, the system will reset.
async event void HplPXA27xOSTimer.fired() {}
+
}
More information about the Tinyos-2-commits
mailing list