mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-20 12:03:52 +01:00
Merge pull request #12787 from gschorcht/cpu/esp32/netdev_default
cpu/esp*: define esp_now as default netdev
This commit is contained in:
commit
d244b0fe59
@ -2,14 +2,10 @@ PSEUDOMODULES += olimex_esp32_gateway
|
|||||||
|
|
||||||
USEMODULE += boards_common_esp32
|
USEMODULE += boards_common_esp32
|
||||||
|
|
||||||
# enables esp_eth as network device
|
# enables esp_eth as default network device
|
||||||
|
# cannot be done in Makefile.dep since Makefile.dep is included too late
|
||||||
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
|
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
|
||||||
# avoid multiple definitions when package depenedencies are resolved recursively
|
USEMODULE += esp_eth
|
||||||
ifndef MODULE_ESP_ETH_ADDED
|
|
||||||
MODULE_ESP_ETH_ADDED = 1
|
|
||||||
USEMODULE += esp_eth
|
|
||||||
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/esp32/Makefile.include
|
include $(RIOTBOARD)/common/esp32/Makefile.include
|
||||||
|
|||||||
@ -41,6 +41,13 @@ ifneq (,$(filter esp_gdbstub,$(USEMODULE)))
|
|||||||
USEMODULE += esp_gdb
|
USEMODULE += esp_gdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
|
||||||
|
# use esp_now as default netdev if no other netdev module is enabled
|
||||||
|
ifeq (,$(filter esp_wifi esp_eth,$(USEMODULE)))
|
||||||
|
USEMODULE += esp_now
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter esp_now,$(USEMODULE)))
|
ifneq (,$(filter esp_now,$(USEMODULE)))
|
||||||
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
||||||
USEMODULE += esp_wifi_any
|
USEMODULE += esp_wifi_any
|
||||||
@ -51,6 +58,10 @@ ifneq (,$(filter esp_wifi,$(USEMODULE)))
|
|||||||
USEMODULE += esp_wifi_any
|
USEMODULE += esp_wifi_any
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter esp_eth,$(USEMODULE)))
|
||||||
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter spiffs,$(USEMODULE)))
|
ifneq (,$(filter spiffs,$(USEMODULE)))
|
||||||
export RIOT_TEST_TIMEOUT = 300
|
export RIOT_TEST_TIMEOUT = 300
|
||||||
endif
|
endif
|
||||||
@ -109,7 +120,7 @@ INCLUDES += -I$(RIOTBOARD)/common/$(CPU)/include
|
|||||||
INCLUDES += -I$(RIOTCPU)/$(CPU)
|
INCLUDES += -I$(RIOTCPU)/$(CPU)
|
||||||
|
|
||||||
# if any WiFi interface is used, the number of priority levels has to be 32
|
# if any WiFi interface is used, the number of priority levels has to be 32
|
||||||
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
ifneq (,$(filter esp_wifi_any esp_eth,$(USEMODULE)))
|
||||||
CFLAGS += -DSCHED_PRIO_LEVELS=32
|
CFLAGS += -DSCHED_PRIO_LEVELS=32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -19,10 +19,25 @@ endif
|
|||||||
# SPECIAL module dependencies
|
# SPECIAL module dependencies
|
||||||
# cannot be done in Makefile.dep since Makefile.dep is included too late
|
# cannot be done in Makefile.dep since Makefile.dep is included too late
|
||||||
|
|
||||||
ifneq (, $(filter esp_now esp_wifi, $(USEMODULE)))
|
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
|
||||||
|
# use esp_now as default netdev if no other netdev module is enabled
|
||||||
|
ifeq (,$(filter esp_wifi esp_eth,$(USEMODULE)))
|
||||||
|
USEMODULE += esp_now
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (, $(filter esp_wifi, $(USEMODULE)))
|
||||||
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
||||||
CFLAGS += -DSCHED_PRIO_LEVELS=32
|
|
||||||
USEMODULE += esp_wifi_any
|
USEMODULE += esp_wifi_any
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (, $(filter esp_now, $(USEMODULE)))
|
||||||
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
||||||
|
USEMODULE += esp_wifi_any
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (, $(filter esp_wifi_any, $(USEMODULE)))
|
||||||
|
CFLAGS += -DSCHED_PRIO_LEVELS=32
|
||||||
USEMODULE += netopt
|
USEMODULE += netopt
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -4,7 +4,8 @@ BOARD_PROVIDES_NETIF := airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51don
|
|||||||
nrf6310 pba-d-01-kw2x samd21-xpro saml21-xpro samr21-xpro spark-core \
|
nrf6310 pba-d-01-kw2x samd21-xpro saml21-xpro samr21-xpro spark-core \
|
||||||
yunjia-nrf51822 msba2 \
|
yunjia-nrf51822 msba2 \
|
||||||
esp32-mh-et-live-minikit esp32-olimex-evb \
|
esp32-mh-et-live-minikit esp32-olimex-evb \
|
||||||
esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit
|
esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit \
|
||||||
|
esp8266-esp-12x esp8266-olimex-mod esp8266-sparkfun-thing
|
||||||
|
|
||||||
BOARD_WHITELIST += $(BOARD_PROVIDES_NETIF)
|
BOARD_WHITELIST += $(BOARD_PROVIDES_NETIF)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user