Disable watchdog software counter. Nested watchdog stop/starts will not work, but the low power protocols will.

This commit is contained in:
dak664 2010-12-18 20:51:11 +00:00
parent 5623ad827b
commit e4b0b3dc8c

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* @(#)$Id: watchdog.c,v 1.2 2010/09/17 21:59:09 dak664 Exp $ * @(#)$Id: watchdog.c,v 1.3 2010/12/18 20:51:11 dak664 Exp $
*/ */
/* Dummy watchdog routines for the Raven 1284p */ /* Dummy watchdog routines for the Raven 1284p */
@ -51,21 +51,21 @@ void
watchdog_start(void) watchdog_start(void)
{ {
stopped--; stopped--;
if(!stopped) // if(!stopped)
wdt_enable(WDTO_2S); wdt_enable(WDTO_2S);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
watchdog_periodic(void) watchdog_periodic(void)
{ {
if(!stopped) // if(!stopped)
wdt_reset(); wdt_reset();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
watchdog_stop(void) watchdog_stop(void)
{ {
stopped++; // stopped++;
wdt_disable(); wdt_disable();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/