1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/shell/cmds: Guard periph_pm calls

It would seem that either we need to require the periph_pm module in shell
or make it optional... since we have many other optional modules here
and we still may want the RIOT_VERSION command, lets make it optional for now.
This commit is contained in:
MrKevinWeiss 2024-04-02 10:19:19 +02:00
parent ad51739c26
commit e017c01acc
No known key found for this signature in database
GPG Key ID: C26684F1C0767FFF

View File

@ -20,7 +20,9 @@
#include <stdio.h>
#ifdef MODULE_PERIPH_PM
#include "periph/pm.h"
#endif
#include "shell.h"
#ifdef MODULE_USB_BOARD_RESET
@ -30,6 +32,7 @@
#include "riotboot/slot.h"
#endif
#ifdef MODULE_PERIPH_PM
static int _reboot_handler(int argc, char **argv)
{
(void) argc;
@ -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)