1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/default-radio-settings: disable if Kconfig

If Kconfig is used for configuring default parameters of radios, this
logic has to be disabled in order to avoid collisions of config macros
This commit is contained in:
Jose Alamos 2020-02-07 12:00:14 +01:00
parent d33e44a85c
commit c712b72400

View File

@ -1,17 +1,19 @@
# Set a custom channel if needed
ifneq (,$(DEFAULT_CHANNEL))
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
ifndef CONFIG_KCONFIG_MODULE_IEEE802154
ifneq (,$(DEFAULT_CHANNEL))
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
endif
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
else # radio is IEEE 802.15.4 2.4 GHz
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
endif
endif
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
else # radio is IEEE 802.15.4 2.4 GHz
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
# Set a custom PAN ID if needed
ifneq (,$(DEFAULT_PAN_ID))
CFLAGS += -DIEEE802154_DEFAULT_PANID=$(DEFAULT_PAN_ID)
endif
endif
# Set a custom PAN ID if needed
ifneq (,$(DEFAULT_PAN_ID))
CFLAGS += -DIEEE802154_DEFAULT_PANID=$(DEFAULT_PAN_ID)
endif