Merge pull request #6342 from haukepetersen/rm_core_rebooth
core: drop `reboot.h`
This commit is contained in:
commit
93b1fc1fde
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
|
|
||||||
*
|
|
||||||
* This file is subject to the terms and conditions of the GNU Lesser
|
|
||||||
* General Public License v2.1. See the file LICENSE in the top level
|
|
||||||
* directory for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup core_internal
|
|
||||||
* @{
|
|
||||||
*
|
|
||||||
* @file
|
|
||||||
* @brief Reboot function
|
|
||||||
*
|
|
||||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef REBOOT_H_
|
|
||||||
#define REBOOT_H_
|
|
||||||
|
|
||||||
#include "periph/pm.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Immediately reboots the system.
|
|
||||||
*
|
|
||||||
* This function is used by core_panic() when the DEVELHELP macro is not defined.
|
|
||||||
*/
|
|
||||||
static inline void reboot(void)
|
|
||||||
{
|
|
||||||
pm_reboot();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* REBOOT_H_ */
|
|
||||||
/** @} */
|
|
||||||
@ -36,9 +36,9 @@
|
|||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "sched.h"
|
#include "sched.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "reboot.h"
|
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "periph/pm.h"
|
||||||
|
|
||||||
#include "uart_stdio.h"
|
#include "uart_stdio.h"
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ __attribute__((used)) void _fini(void)
|
|||||||
*/
|
*/
|
||||||
void _exit(int n)
|
void _exit(int n)
|
||||||
{
|
{
|
||||||
LOG_INFO("#! exit %i: resetting\n", n);
|
LOG_INFO("#! exit %i: powering off\n", n);
|
||||||
reboot();
|
pm_off();
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,14 +18,14 @@
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "reboot.h"
|
#include "periph/pm.h"
|
||||||
|
|
||||||
int _reboot_handler(int argc, char **argv)
|
int _reboot_handler(int argc, char **argv)
|
||||||
{
|
{
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
(void) argv;
|
||||||
|
|
||||||
reboot();
|
pm_reboot();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user