[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.
This commit is contained in:
10
platform/stm32/rules.mk
Normal file
10
platform/stm32/rules.mk
Normal file
@@ -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
|
||||
@@ -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 \
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user