aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-02 23:16:20 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-04-02 23:19:25 -0400
commit85c0e9c574df15c47d9823e6dd74071bc87f2ab5 (patch)
tree870869aef91eddd3a010b9505c099d14e6b8c4f8
parent0c3ec7f9a5f38a87c35eb473a145177df2f3994a (diff)
downloadkutter-85c0e9c574df15c47d9823e6dd74071bc87f2ab5.tar.gz
kutter-85c0e9c574df15c47d9823e6dd74071bc87f2ab5.tar.xz
kutter-85c0e9c574df15c47d9823e6dd74071bc87f2ab5.zip
sam3x8e: Implement reset command
Support restarting the mcu via a new reset command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/sam3x8e/main.c7
1 files changed, 7 insertions, 0 deletions
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)
{