cpu/esp8266: defines esp_now as default netdev

If the user or the board definition doesn't enable `esp_wifi`, `esp_now` is defined as default netdev.
This commit is contained in:
Gunar Schorcht
2019-11-23 14:26:37 +01:00
parent 71d6a71364
commit 7325192fcd
+17 -2
View File
@@ -19,10 +19,25 @@ endif
# SPECIAL module dependencies
# 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))))
CFLAGS += -DSCHED_PRIO_LEVELS=32
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 += xtimer
endif