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

core/panic: fix build with !periph_pm

This commit is contained in:
Benjamin Valentin 2024-01-11 21:15:17 +01:00
parent 7add6c2fcc
commit ce36ca50ab

View File

@ -79,16 +79,18 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message)
/* disable watchdog and all possible sources of interrupts */
irq_disable();
panic_arch();
#ifndef DEVELHELP
#if !defined(DEVELHELP) && defined(MODULE_PERIPH_PM)
/* DEVELHELP not set => reboot system */
pm_reboot();
#else
/* DEVELHELP set => power off system */
/* or start bootloader */
#ifdef MODULE_USB_BOARD_RESET
#if defined(MODULE_USB_BOARD_RESET)
usb_board_reset_in_bootloader();
#else
#elif defined(MODULE_PERIPH_PM)
pm_off();
#else
while (1) {}
#endif
#endif /* DEVELHELP */