Add Disable and use the avrlibc wdt functions

pull/67/head^2
Alex Voinea 2021-07-20 13:57:27 +03:00
parent 56eee8dcfb
commit a433db5648
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -8,6 +8,7 @@ namespace watchdog {
/// watchdog interface
void Enable(uint16_t period);
void Disable();
void Reset();
} // namespace watchdog