@@ -57,8 +57,8 @@ void setup()
57
57
// Set watchdog interrupt to 1 seconds (128 ticks / 128 Hz = 1 second)
58
58
// Set watchdog reset ~2 seconds (255 ticks / 128 Hz = 1.99 seconds)
59
59
// Note: Ticks are limited to 255 (8-bit)
60
- WDT .configure (WDT_128HZ, 128 , 255 ); // Equivalent to: wdt.configure(1, 128, 255);
61
- WDT .start (); // Start the watchdog
60
+ wdt .configure (WDT_128HZ, 128 , 255 ); // Equivalent to: wdt.configure(1, 128, 255);
61
+ wdt .start (); // Start the watchdog
62
62
}
63
63
64
64
void loop ()
@@ -74,9 +74,9 @@ void loop()
74
74
Serial.print (" Period: " ); Serial.print (currentMillis); Serial.println (" ms" );
75
75
76
76
// The watchdog configurations can also be set individually
77
- WDT .setClock (WDT_16HZ); // Set watchdog timer clock to 16 Hz
78
- WDT .setInterrupt (64 ); // Set watchdog interrupt to 4 second (64 ticks / 16 Hz = 4 seconds)
79
- WDT .setReset (96 ); // Set watchdog reset to 8 seconds (96 ticks / 16 Hz = 8 seconds)
77
+ wdt .setClock (WDT_16HZ); // Set watchdog timer clock to 16 Hz
78
+ wdt .setInterrupt (64 ); // Set watchdog interrupt to 4 second (64 ticks / 16 Hz = 4 seconds)
79
+ wdt .setReset (96 ); // Set watchdog reset to 8 seconds (96 ticks / 16 Hz = 8 seconds)
80
80
81
81
if (watchdogInterrupt == 9 )
82
82
{
@@ -91,12 +91,12 @@ void loop()
91
91
extern " C" void am_watchdog_isr (void )
92
92
{
93
93
// Clear the watchdog interrupt
94
- WDT .clear ();
94
+ wdt .clear ();
95
95
96
96
// Catch the first eight watchdog interrupts, but let the ninth through untouched
97
97
if ( watchdogInterrupt < 8 )
98
98
{
99
- WDT .restart (); // "Pet" the dog
99
+ wdt .restart (); // "Pet" the dog
100
100
}
101
101
else
102
102
{
0 commit comments