From 4b4cbb03176412ef16c51c9ff8b3057db083e900 Mon Sep 17 00:00:00 2001
From: Aaron Sowry <aaron@sowry.nz>
Date: Fri, 8 Jul 2016 13:59:20 +1200
Subject: [PATCH] boards/openmote-cc2538: Add RF driver as dependency for board

---
 boards/openmote-cc2538/Makefile.dep          | 6 ++++++
 boards/openmote-cc2538/Makefile.include      | 4 ++++
 boards/openmote-cc2538/include/periph_conf.h | 7 +++++++
 3 files changed, 17 insertions(+)
 create mode 100644 boards/openmote-cc2538/Makefile.dep

diff --git a/boards/openmote-cc2538/Makefile.dep b/boards/openmote-cc2538/Makefile.dep
new file mode 100644
index 0000000000..3030d87f8b
--- /dev/null
+++ b/boards/openmote-cc2538/Makefile.dep
@@ -0,0 +1,6 @@
+ifneq (,$(filter gnrc_netdev_default,$(USEMODULE)))
+    USEMODULE += netif
+    USEMODULE += cc2538_rf
+    USEMODULE += gnrc_netdev2
+    USEMODULE += netdev2_ieee802154
+endif
diff --git a/boards/openmote-cc2538/Makefile.include b/boards/openmote-cc2538/Makefile.include
index a75c8ff346..5a55a6909f 100644
--- a/boards/openmote-cc2538/Makefile.include
+++ b/boards/openmote-cc2538/Makefile.include
@@ -14,6 +14,7 @@ ifeq ($(PROGRAMMER),jlink)
   export JLINK_DEVICE := cc2538sf53
   export JLINK_FLASH_ADDR := 200000
   export JLINK_IF := JTAG
+  export TUI := 1
   include $(RIOTBOARD)/Makefile.include.jlink
 else
   export OFLAGS = -O binary
@@ -24,3 +25,6 @@ endif
 
 # setup serial terminal
 include $(RIOTBOARD)/Makefile.include.serial
+
+# Include board dependencies
+include $(RIOTBOARD)/$(BOARD)/Makefile.dep
diff --git a/boards/openmote-cc2538/include/periph_conf.h b/boards/openmote-cc2538/include/periph_conf.h
index a2d490908f..d65c08b0e5 100644
--- a/boards/openmote-cc2538/include/periph_conf.h
+++ b/boards/openmote-cc2538/include/periph_conf.h
@@ -214,6 +214,13 @@ static const periph_spi_conf_t spi_config[SPI_NUMOF] = {
 #define GPIO_31_PIN         GPIO_PD7
 /** @} */
 
+/**
+ * @name Radio peripheral configuration
+ * @{
+ */
+#define RADIO_IRQ_PRIO      1
+/** @} */
+
 #ifdef __cplusplus
 } /* end extern "C" */
 #endif
-- 
GitLab