From 75295df810fbe15a4d7d9846e61c1ad136d5a492 Mon Sep 17 00:00:00 2001 From: Jue Date: Fri, 28 Oct 2022 18:26:13 +0200 Subject: [PATCH] cpu/saml21/pm: allow blocking IDLE mode --- cpu/saml21/periph/pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/saml21/periph/pm.c b/cpu/saml21/periph/pm.c index e4b557af44..26443e8346 100644 --- a/cpu/saml21/periph/pm.c +++ b/cpu/saml21/periph/pm.c @@ -40,7 +40,6 @@ void pm_set(unsigned mode) _mode = PM_SLEEPCFG_SLEEPMODE_STANDBY; deep = 1; break; - default: /* Falls through */ case SAML21_PM_MODE_IDLE: DEBUG_PUTS("pm_set(): setting IDLE mode."); #if !defined(PM_SLEEPCFG_SLEEPMODE_IDLE2) @@ -49,6 +48,9 @@ void pm_set(unsigned mode) _mode = PM_SLEEPCFG_SLEEPMODE_IDLE2; #endif break; + default: + /* don't sleep at all */ + return; } /* write sleep configuration */