mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
00965e3a40
The default channel configuration is managed within the Makefiles of many examples and tests. This commit moves the default channel logic to `makefiles/default-channel.ink.mk` to ease maintenance. All Makefiles that previously managed the default channel configuration themself have been updated to include that file. The default channel configuration of the cc110x has been added
14 lines
549 B
Makefile
14 lines
549 B
Makefile
# Set a custom channel if needed
|
|
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
|
DEFAULT_CHANNEL ?= 0
|
|
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
|
else
|
|
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
|
DEFAULT_CHANNEL ?= 5
|
|
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
|
else # radio is IEEE 802.15.4 2.4 GHz
|
|
DEFAULT_CHANNEL ?= 26
|
|
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
|
endif
|
|
endif
|