armcm_reset: Add a new helper file defining command_reset()
Add a generic ARM Cortex-M implementation of the "reset" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
15
src/generic/armcm_reset.c
Normal file
15
src/generic/armcm_reset.c
Normal file
@@ -0,0 +1,15 @@
|
||||
// Generic reset command handler for ARM Cortex-M boards
|
||||
//
|
||||
// Copyright (C) 2019 Kevin O'Connor <kevin@koconnor.net>
|
||||
//
|
||||
// This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
|
||||
#include "board/internal.h" // NVIC_SystemReset
|
||||
#include "command.h" // DECL_COMMAND_FLAGS
|
||||
|
||||
void
|
||||
command_reset(uint32_t *args)
|
||||
{
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
DECL_COMMAND_FLAGS(command_reset, HF_IN_SHUTDOWN, "reset");
|
||||
Reference in New Issue
Block a user