From b6b1aedc0d8ad0b4f9b4e077f96eed6502450af9 Mon Sep 17 00:00:00 2001 From: Hyungsin Date: Tue, 4 Jul 2017 16:00:17 -0700 Subject: [PATCH] pm configuration fix --- cpu/sam0_common/include/periph_cpu_common.h | 2 ++ drivers/periph_common/pm.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cpu/sam0_common/include/periph_cpu_common.h b/cpu/sam0_common/include/periph_cpu_common.h index 461b1e2753052..a5c0b637d7045 100644 --- a/cpu/sam0_common/include/periph_cpu_common.h +++ b/cpu/sam0_common/include/periph_cpu_common.h @@ -65,7 +65,9 @@ typedef uint32_t gpio_t; */ #define PM_NUM_MODES (3) /** @todo we block all modes per default, until PM is cleanly implemented */ +#ifndef PM_BLOCKER_INITIAL #define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 } +#endif /** @} */ #ifndef DOXYGEN diff --git a/drivers/periph_common/pm.c b/drivers/periph_common/pm.c index afd31b741e150..77c7012ce61b7 100644 --- a/drivers/periph_common/pm.c +++ b/drivers/periph_common/pm.c @@ -24,6 +24,7 @@ #define ENABLE_DEBUG (0) #include "debug.h" +#ifndef FEATURE_PERIPH_PM void __attribute__((weak)) pm_set_lowest(void) {} void __attribute__((weak)) pm_off(void) @@ -31,3 +32,4 @@ void __attribute__((weak)) pm_off(void) irq_disable(); while(1) {}; } +#endif