diff --git a/cpu/stm32_common/Makefile.include b/cpu/stm32_common/Makefile.include index 13ce83f9c2c06..3a92639203e61 100644 --- a/cpu/stm32_common/Makefile.include +++ b/cpu/stm32_common/Makefile.include @@ -5,6 +5,9 @@ export CFLAGS += -DCPU_FAM_$(FAM) # include common periph module USEMODULE += periph_common +# All stm32 families provide pm support +USEMODULE += pm_layered + # include stm32 common functions and stm32 common periph drivers USEMODULE += stm32_common stm32_common_periph diff --git a/cpu/stm32_common/include/periph_cpu_common.h b/cpu/stm32_common/include/periph_cpu_common.h index c61acbcaaf13f..2debe87737f0c 100644 --- a/cpu/stm32_common/include/periph_cpu_common.h +++ b/cpu/stm32_common/include/periph_cpu_common.h @@ -78,11 +78,6 @@ extern "C" { * @name PM definitions * @{ */ -#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F1) || \ - defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4) || \ - defined(CPU_FAM_STM32F7) || defined(CPU_FAM_STM32L0) || \ - defined(CPU_FAM_STM32L1) || defined(CPU_FAM_STM32L4) || \ - defined(DOXYGEN) /** * @brief Number of usable low power modes */ @@ -102,7 +97,6 @@ extern "C" { */ #define PM_EWUP_CONFIG (0U) #endif -#endif /** @} */ /** diff --git a/cpu/stm32f0/Makefile.include b/cpu/stm32f0/Makefile.include index 2010afd0ad4cc..18fc5c661dc29 100644 --- a/cpu/stm32f0/Makefile.include +++ b/cpu/stm32f0/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m0 export CPU_FAM = stm32f0 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f1/Makefile.include b/cpu/stm32f1/Makefile.include index abe4696648eef..7ca8e6dec6d68 100644 --- a/cpu/stm32f1/Makefile.include +++ b/cpu/stm32f1/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m3 export CPU_FAM = stm32f1 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f2/Makefile.include b/cpu/stm32f2/Makefile.include index 453f82cd46021..38ab4d6357faa 100644 --- a/cpu/stm32f2/Makefile.include +++ b/cpu/stm32f2/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m3 export CPU_FAM = stm32f2 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f4/Makefile.include b/cpu/stm32f4/Makefile.include index c88560db69f7b..4d3c26695cbb6 100644 --- a/cpu/stm32f4/Makefile.include +++ b/cpu/stm32f4/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = stm32f4 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f7/Makefile.include b/cpu/stm32f7/Makefile.include index 2417ef526ca5d..2e32400dd1f17 100644 --- a/cpu/stm32f7/Makefile.include +++ b/cpu/stm32f7/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m7 export CPU_FAM = stm32f7 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l0/Makefile.include b/cpu/stm32l0/Makefile.include index 779df613a4821..ccf6a3b05e6f2 100644 --- a/cpu/stm32l0/Makefile.include +++ b/cpu/stm32l0/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m0plus export CPU_FAM = stm32l0 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l1/Makefile.include b/cpu/stm32l1/Makefile.include index a61c7299f6fba..3d6f379e13b4e 100644 --- a/cpu/stm32l1/Makefile.include +++ b/cpu/stm32l1/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m3 export CPU_FAM = stm32l1 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l4/Makefile.include b/cpu/stm32l4/Makefile.include index ccfedba106192..82e28ee689ace 100644 --- a/cpu/stm32l4/Makefile.include +++ b/cpu/stm32l4/Makefile.include @@ -1,7 +1,5 @@ export CPU_ARCH = cortex-m4f export CPU_FAM = stm32l4 -USEMODULE += pm_layered - include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk