From f66fd7b1ca88a20e92a78e996a2b13aad964683d Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 14 Feb 2020 12:05:01 +0100 Subject: [PATCH 1/2] sys/pm_layered: change PM_BLOCKER_INITIAL to single value --- sys/pm_layered/pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/pm_layered/pm.c b/sys/pm_layered/pm.c index ede2b51dd7..3f63bfa7b9 100644 --- a/sys/pm_layered/pm.c +++ b/sys/pm_layered/pm.c @@ -30,7 +30,7 @@ #endif #ifndef PM_BLOCKER_INITIAL -#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 } +#define PM_BLOCKER_INITIAL 0x01010101 /* block all by default */ #endif /** @@ -44,7 +44,7 @@ typedef union { /** * @brief Global variable for keeping track of blocked modes */ -volatile pm_blocker_t pm_blocker = PM_BLOCKER_INITIAL; +volatile pm_blocker_t pm_blocker = { .val_u32 = PM_BLOCKER_INITIAL }; void pm_set_lowest(void) { From 1a75f261334d7f1333c24c232d75f13f07b6bbe6 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 14 Feb 2020 12:05:28 +0100 Subject: [PATCH 2/2] cpu/*: update to PM_BLOCKER_INITIAL as single value --- cpu/samd21/include/periph_cpu.h | 2 +- cpu/saml1x/include/periph_cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/samd21/include/periph_cpu.h b/cpu/samd21/include/periph_cpu.h index 608ba468be..69b8e8272f 100644 --- a/cpu/samd21/include/periph_cpu.h +++ b/cpu/samd21/include/periph_cpu.h @@ -32,7 +32,7 @@ extern "C" { * @brief Override the default initial PM blocker * @todo Idle modes are enabled by default, deep sleep mode blocked */ -#define PM_BLOCKER_INITIAL { .val_u32 = 0x00000001 } +#define PM_BLOCKER_INITIAL 0x00000001 /** * @name SAMD21 sleep modes for PM diff --git a/cpu/saml1x/include/periph_cpu.h b/cpu/saml1x/include/periph_cpu.h index 1732b3ff6b..93eb7bb9b5 100644 --- a/cpu/saml1x/include/periph_cpu.h +++ b/cpu/saml1x/include/periph_cpu.h @@ -30,7 +30,7 @@ extern "C" { * @brief Override the default initial PM blocker * @todo Idle modes are enabled by default, deep sleep mode blocked */ -#define PM_BLOCKER_INITIAL { .val_u32 = 0x00000001 } +#define PM_BLOCKER_INITIAL 0x00000001 /** * @name SAML1x GCLK definitions