From 0bb04cfd27d50b09f31280541f45ad8c592aaab7 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 28 Sep 2019 19:30:52 +0200 Subject: [PATCH] drivers/mrf24j40: add pseudomodules for MRF24J40MA/C/D/E Microchip offers ready-to-use modules with the mrf24j40 chip. All but the MRF24J40MA integrate an external PA/LNA, they also come with an RF shield. If the PA/LNA is not enabled, the signal off these modules is really poor. This adds pseudomodules so that the PA/LNA is automatically enabled when the appropriate module is used. --- drivers/Makefile.dep | 9 +++++++++ makefiles/pseudomodules.inc.mk | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/Makefile.dep b/drivers/Makefile.dep index 29a2918e73..7f9f85aed7 100644 --- a/drivers/Makefile.dep +++ b/drivers/Makefile.dep @@ -331,6 +331,15 @@ ifneq (,$(filter mq3,$(USEMODULE))) FEATURES_REQUIRED += periph_adc endif +ifneq (,$(filter mrf24j40m%,$(USEMODULE))) + USEMODULE += mrf24j40 + + # all modules but mrf24j40ma have an external PA + ifeq (,$(filter mrf24j40ma,$(USEMODULE))) + CFLAGS += -DMRF24J40_USE_EXT_PA_LNA + endif +endif + ifneq (,$(filter mrf24j40,$(USEMODULE))) USEMODULE += xtimer USEMODULE += luid diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index a3d17978ff..818839dbe5 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -107,6 +107,9 @@ PSEUDOMODULES += cc1100 PSEUDOMODULES += cc1100e PSEUDOMODULES += cc1101 +# include variants of mrf24j40 drivers as pseudo modules +PSEUDOMODULES += mrf24j40m% + # include variants of SX127X drivers as pseudo modules PSEUDOMODULES += sx1272 PSEUDOMODULES += sx1276