Browse Source

sys/newlib+shell: use pm_reboot() for reboot()

pr/spi.typo
Hauke Petersen 6 years ago
parent
commit
d0301dfa34
  1. 4
      sys/newlib/syscalls.c
  2. 4
      sys/shell/commands/sc_sys.c

4
sys/newlib/syscalls.c

@ -36,9 +36,9 @@
#include "board.h"
#include "sched.h"
#include "thread.h"
#include "reboot.h"
#include "irq.h"
#include "log.h"
#include "periph/pm.h"
#include "uart_stdio.h"
@ -83,7 +83,7 @@ __attribute__((used)) void _fini(void)
void _exit(int n)
{
LOG_INFO("#! exit %i: resetting\n", n);
reboot();
pm_reboot();
while(1);
}

4
sys/shell/commands/sc_sys.c

@ -18,14 +18,14 @@
* @}
*/
#include "reboot.h"
#include "periph/pm.h"
int _reboot_handler(int argc, char **argv)
{
(void) argc;
(void) argv;
reboot();
pm_reboot();
return 0;
}

Loading…
Cancel
Save