From 35f626772102d8b52a5fa368f13955e49500d1b2 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 2 Apr 2024 11:47:30 +0200 Subject: [PATCH] sys/picolibc_syscalls_default: guard pm_off --- sys/picolibc_syscalls_default/syscalls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/picolibc_syscalls_default/syscalls.c b/sys/picolibc_syscalls_default/syscalls.c index eb7d450871..a42e7e18c4 100644 --- a/sys/picolibc_syscalls_default/syscalls.c +++ b/sys/picolibc_syscalls_default/syscalls.c @@ -27,7 +27,9 @@ #include "irq.h" #include "log.h" +#ifdef MODULE_PERIPH_PM #include "periph/pm.h" +#endif #include "stdio_base.h" #ifndef NUM_HEAPS @@ -117,7 +119,9 @@ void __attribute__((__noreturn__)) _exit(int n) { LOG_INFO("#! exit %i: powering off\n", n); +#ifdef MODULE_PERIPH_PM pm_off(); +#endif /* MODULE_PERIPH_PM */ for (;;) { } }