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

Merge pull request #20247 from benpicco/cpu/avr8-pm_layered

cpu/avr8_common: allow to build with !periph_pm
This commit is contained in:
benpicco 2024-01-11 21:02:28 +00:00 committed by GitHub
commit 47b5eebf84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

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 */

View File

@ -5,7 +5,7 @@ USEMODULE += avr_libc_extra
USEMODULE += avr8_common avr8_common_periph
# All avr8 CPUs provide PM
USEMODULE += pm_layered
DEFAULT_MODULE += pm_layered
# The AVR-libc provides no thread safe malloc implementation and has no hooks
# to inject. Use malloc_thread_safe to link calls to malloc to safe wrappers