diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-04-02 23:16:20 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-04-02 23:19:25 -0400 |
commit | 85c0e9c574df15c47d9823e6dd74071bc87f2ab5 (patch) | |
tree | 870869aef91eddd3a010b9505c099d14e6b8c4f8 | |
parent | 0c3ec7f9a5f38a87c35eb473a145177df2f3994a (diff) | |
download | kutter-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.c | 7 |
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) { |