diff options
author | Girts Folkmanis <girtsf@users.noreply.github.com> | 2016-09-15 13:33:58 -0700 |
---|---|---|
committer | Girts Folkmanis <girtsf@users.noreply.github.com> | 2016-09-15 13:41:45 -0700 |
commit | 58ee575dcba144cbeb94af4f94286f62380a3d1a (patch) | |
tree | 6f239c5451d9581e6ae66b61df28be4beb4caa10 | |
parent | 0c782aa3817265fa7174029d56ffe2701ba4bb7a (diff) | |
download | common-58ee575dcba144cbeb94af4f94286f62380a3d1a.tar.gz |
[stm32] share power.c across stm32 platforms.
Previously power.c was only implemented for f7, but the
same functionality exists in other stm32 devices, thanks
to CMSIS defines.
This refactors out f7's power.c to platform/stm32/ and adds
deps from f7 and f4.
-rw-r--r-- | platform/stm32/power.c (renamed from platform/stm32f7xx/power.c) | 0 | ||||
-rw-r--r-- | platform/stm32/rules.mk | 10 | ||||
-rw-r--r-- | platform/stm32f4xx/rules.mk | 1 | ||||
-rw-r--r-- | platform/stm32f7xx/rules.mk | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/platform/stm32f7xx/power.c b/platform/stm32/power.c index faee2ce8..faee2ce8 100644 --- a/platform/stm32f7xx/power.c +++ b/platform/stm32/power.c diff --git a/platform/stm32/rules.mk b/platform/stm32/rules.mk new file mode 100644 index 00000000..cb3ccec9 --- /dev/null +++ b/platform/stm32/rules.mk @@ -0,0 +1,10 @@ +# Code shared across different stm32 platforms. + +LOCAL_DIR := $(GET_LOCAL_DIR) + +MODULE := $(LOCAL_DIR) + +MODULE_SRCS += \ + $(LOCAL_DIR)/power.c + +include make/module.mk diff --git a/platform/stm32f4xx/rules.mk b/platform/stm32f4xx/rules.mk index 02e6d2af..33c0535e 100644 --- a/platform/stm32f4xx/rules.mk +++ b/platform/stm32f4xx/rules.mk @@ -47,6 +47,7 @@ LINKER_SCRIPT += \ $(BUILDDIR)/system-twosegment.ld MODULE_DEPS += \ + platform/stm32 \ platform/stm32f4xx/STM32F4xx_StdPeriph_Driver \ arch/arm/arm-m/systick \ lib/cbuf \ diff --git a/platform/stm32f7xx/rules.mk b/platform/stm32f7xx/rules.mk index 27c033cd..1c20f031 100644 --- a/platform/stm32f7xx/rules.mk +++ b/platform/stm32f7xx/rules.mk @@ -43,7 +43,6 @@ MODULE_SRCS += \ $(LOCAL_DIR)/flash.c \ $(LOCAL_DIR)/gpio.c \ $(LOCAL_DIR)/init.c \ - $(LOCAL_DIR)/power.c \ $(LOCAL_DIR)/timer.c \ $(LOCAL_DIR)/uart.c \ $(LOCAL_DIR)/usbc.c \ @@ -60,6 +59,7 @@ LINKER_SCRIPT += \ $(BUILDDIR)/system-twosegment.ld MODULE_DEPS += \ + platform/stm32 \ platform/stm32f7xx/STM32F7xx_HAL_Driver \ arch/arm/arm-m/systick \ dev/gpio \ |