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

sys/newlib_syscalls_default: guard pm_off

This commit is contained in:
MrKevinWeiss 2024-04-02 11:46:50 +02:00
parent e017c01acc
commit bead59e9d1
No known key found for this signature in database
GPG Key ID: C26684F1C0767FFF

View File

@ -36,7 +36,9 @@
#include "log.h"
#include "modules.h"
#ifdef MODULE_PERIPH_PM
#include "periph/pm.h"
#endif
#include "sched.h"
#include "stdio_base.h"
#include "thread.h"
@ -183,7 +185,9 @@ __attribute__((used)) void _fini(void)
__attribute__((used)) void _exit(int n)
{
LOG_INFO("#! exit %i: powering off\n", n);
#ifdef MODULE_PERIPH_PM
pm_off();
#endif
while (1) {}
}