aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atsamd/main.c')
-rw-r--r--src/atsamd/main.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/atsamd/main.c b/src/atsamd/main.c
index 5cd85d44..9233662f 100644
--- a/src/atsamd/main.c
+++ b/src/atsamd/main.c
@@ -5,41 +5,11 @@
// This file may be distributed under the terms of the GNU GPLv3 license.
#include "command.h" // DECL_CONSTANT
-#include "internal.h" // WDT
+#include "internal.h" // NVIC_SystemReset
#include "sched.h" // sched_main
DECL_CONSTANT(MCU, CONFIG_MCU);
-
-/****************************************************************
- * watchdog handler
- ****************************************************************/
-
-void
-watchdog_reset(void)
-{
- WDT->CLEAR.reg = 0xa5;
-}
-DECL_TASK(watchdog_reset);
-
-void
-watchdog_init(void)
-{
-#if CONFIG_MACH_SAMD21
- WDT->CONFIG.reg = WDT_CONFIG_PER_16K; // 500ms timeout
- WDT->CTRL.reg = WDT_CTRL_ENABLE;
-#elif CONFIG_MACH_SAMD51
- WDT->CONFIG.reg = WDT_CONFIG_PER(6); // 500ms timeout
- WDT->CTRLA.reg = WDT_CTRLA_ENABLE;
-#endif
-}
-DECL_INIT(watchdog_init);
-
-
-/****************************************************************
- * misc functions
- ****************************************************************/
-
void
command_reset(uint32_t *args)
{