Add Disable and use the avrlibc wdt functions
parent
56eee8dcfb
commit
a433db5648
|
|
@ -1,4 +1,5 @@
|
|||
#include "../watchdog.h"
|
||||
#include <avr/wdt.h>
|
||||
|
||||
namespace hal {
|
||||
namespace watchdog {
|
||||
|
|
@ -7,8 +8,12 @@ void Enable(uint16_t period) {
|
|||
// @@TODO
|
||||
}
|
||||
|
||||
void Disable() {
|
||||
wdt_disable();
|
||||
}
|
||||
|
||||
void Reset() {
|
||||
asm("wdr");
|
||||
wdt_reset();
|
||||
}
|
||||
|
||||
} // namespace watchdog
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace watchdog {
|
|||
|
||||
/// watchdog interface
|
||||
void Enable(uint16_t period);
|
||||
void Disable();
|
||||
void Reset();
|
||||
|
||||
} // namespace watchdog
|
||||
|
|
|
|||
Loading…
Reference in New Issue