Skip to content

Commit

Permalink
Merge pull request #20523 from MrKevinWeiss/pr/guard_shell_pm
Browse files Browse the repository at this point in the history
sys/shell/cmds: Guard periph_pm calls
  • Loading branch information
Teufelchen1 authored Apr 2, 2024
2 parents ad51739 + e017c01 commit ee0c058
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/shell/cmds/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

#include <stdio.h>

#ifdef MODULE_PERIPH_PM
#include "periph/pm.h"
#endif
#include "shell.h"

#ifdef MODULE_USB_BOARD_RESET
Expand All @@ -30,6 +32,7 @@
#include "riotboot/slot.h"
#endif

#ifdef MODULE_PERIPH_PM
static int _reboot_handler(int argc, char **argv)
{
(void) argc;
Expand All @@ -41,6 +44,7 @@ static int _reboot_handler(int argc, char **argv)
}

SHELL_COMMAND(reboot, "Reboot the node", _reboot_handler);
#endif /* MODULE_PERIPH_PM */

#ifdef MODULE_USB_BOARD_RESET
static int _bootloader_handler(int argc, char **argv)
Expand Down

0 comments on commit ee0c058

Please sign in to comment.