From 85c0e9c574df15c47d9823e6dd74071bc87f2ab5 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 2 Apr 2017 23:16:20 -0400 Subject: [PATCH] sam3x8e: Implement reset command Support restarting the mcu via a new reset command. Signed-off-by: Kevin O'Connor --- src/sam3x8e/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sam3x8e/main.c b/src/sam3x8e/main.c index 2ad907c9..a7e7ee55 100644 --- a/src/sam3x8e/main.c +++ b/src/sam3x8e/main.c @@ -36,6 +36,13 @@ DECL_INIT(watchdog_init); * misc functions ****************************************************************/ +void +command_reset(uint32_t *args) +{ + NVIC_SystemReset(); +} +DECL_COMMAND_FLAGS(command_reset, HF_IN_SHUTDOWN, "reset"); + size_t alloc_maxsize(size_t reqsize) {