1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/stm32_common/periph/Makefile
cladmi d8080a66e4
cpu/stm32_common: Do not use USEMODULE to select i2c implem
`cpu/stm32_common/Makefile.dep` was never included by the global
`Makefile.dep`, so declaring this `USEMODULE +=` here was never shown to
the build system and never exported as `MODULE_PERIPH_I2C_X` variables.

In fact, `USEMODULE` was only used to trigger the `periph.mk`/`SUBMODULES`
mechanism to add matching source files names to `SRC` and so select
the implementation for each CPU type.

It is replaced by just explicitly selecting the right source file.
2018-10-11 15:20:25 +02:00

13 lines
304 B
Makefile

MODULE = stm32_common_periph
# Select the specific implementation for `periph_i2c`
ifneq (,$(filter periph_i2c,$(USEMODULE)))
ifneq (,$(filter $(CPU),stm32f0 stm32f3 stm32f7 stm32l0 stm32l4))
SRC += i2c_1.c
else # stm32f1/f2/f4/l1
SRC += i2c_2.c
endif
endif
include $(RIOTMAKE)/periph.mk