mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #6039 from aabadie/fix_gnrc_networking_channel
example: fix custom 802.15.4 channel definition
This commit is contained in:
commit
2d571bc9e6
@ -72,14 +72,14 @@ endif
|
|||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
# Set a custom channel if needed
|
# Set a custom channel if needed
|
||||||
ifeq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 0
|
DEFAULT_CHANNEL ?= 0
|
||||||
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else
|
else
|
||||||
ifeq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 5
|
DEFAULT_CHANNEL ?= 5
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else # radio is IEEE 802.15.4 2.4 GHz
|
else # radio is IEEE 802.15.4 2.4 GHz
|
||||||
DEFAULT_CHANNEL ?= 26
|
DEFAULT_CHANNEL ?= 26
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
endif
|
endif
|
||||||
|
@ -64,14 +64,14 @@ host-tools:
|
|||||||
$(AD)env -u CC -u CFLAGS make -C $(RIOTBASE)/dist/tools
|
$(AD)env -u CC -u CFLAGS make -C $(RIOTBASE)/dist/tools
|
||||||
|
|
||||||
# Set a custom channel if needed
|
# Set a custom channel if needed
|
||||||
ifeq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 0
|
DEFAULT_CHANNEL ?= 0
|
||||||
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else
|
else
|
||||||
ifeq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 5
|
DEFAULT_CHANNEL ?= 5
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else # radio is IEEE 802.15.4 2.4 GHz
|
else # radio is IEEE 802.15.4 2.4 GHz
|
||||||
DEFAULT_CHANNEL ?= 26
|
DEFAULT_CHANNEL ?= 26
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
endif
|
endif
|
||||||
|
@ -44,14 +44,14 @@ QUIET ?= 1
|
|||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
# Set a custom channel if needed
|
# Set a custom channel if needed
|
||||||
ifeq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 0
|
DEFAULT_CHANNEL ?= 0
|
||||||
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else
|
else
|
||||||
ifeq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 5
|
DEFAULT_CHANNEL ?= 5
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else # radio is IEEE 802.15.4 2.4 GHz
|
else # radio is IEEE 802.15.4 2.4 GHz
|
||||||
DEFAULT_CHANNEL ?= 26
|
DEFAULT_CHANNEL ?= 26
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
endif
|
endif
|
||||||
|
@ -34,10 +34,6 @@ USEMODULE += netstats_l2
|
|||||||
USEMODULE += netstats_ipv6
|
USEMODULE += netstats_ipv6
|
||||||
USEMODULE += netstats_rpl
|
USEMODULE += netstats_rpl
|
||||||
|
|
||||||
# Set a custom 802.15.4 channel if needed
|
|
||||||
DEFAULT_CHANNEL ?= 26
|
|
||||||
CFLAGS += -DDEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
|
||||||
|
|
||||||
# Comment this out to disable code in RIOT that does safety checking
|
# Comment this out to disable code in RIOT that does safety checking
|
||||||
# which is not needed in a production environment but helps in the
|
# which is not needed in a production environment but helps in the
|
||||||
# development process:
|
# development process:
|
||||||
@ -51,3 +47,17 @@ CFLAGS += -DDEVELHELP
|
|||||||
QUIET ?= 1
|
QUIET ?= 1
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
|
# 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
|
||||||
|
FLAGS += -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
|
||||||
|
@ -58,14 +58,14 @@ QUIET ?= 1
|
|||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
# Set a custom channel if needed
|
# Set a custom channel if needed
|
||||||
ifeq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 0
|
DEFAULT_CHANNEL ?= 0
|
||||||
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else
|
else
|
||||||
ifeq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
|
||||||
DEFAULT_CHANNEL ?= 5
|
DEFAULT_CHANNEL ?= 5
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
else # radio is IEEE 802.15.4 2.4 GHz
|
else # radio is IEEE 802.15.4 2.4 GHz
|
||||||
DEFAULT_CHANNEL ?= 26
|
DEFAULT_CHANNEL ?= 26
|
||||||
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
||||||
endif
|
endif
|
||||||
|
@ -37,10 +37,6 @@ USEPKG += nanocoap
|
|||||||
# include this for printing IP addresses
|
# include this for printing IP addresses
|
||||||
USEMODULE += shell_commands
|
USEMODULE += shell_commands
|
||||||
|
|
||||||
# Set a custom 802.15.4 channel if needed
|
|
||||||
DEFAULT_CHANNEL ?= 26
|
|
||||||
CFLAGS += -DDEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
|
|
||||||
|
|
||||||
# Comment this out to disable code in RIOT that does safety checking
|
# Comment this out to disable code in RIOT that does safety checking
|
||||||
# which is not needed in a production environment but helps in the
|
# which is not needed in a production environment but helps in the
|
||||||
# development process:
|
# development process:
|
||||||
@ -64,3 +60,17 @@ endif
|
|||||||
QUIET ?= 1
|
QUIET ?= 1
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
|
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user