From 8b28a72eec2550b610b65ace2a889ed3c97ec7e0 Mon Sep 17 00:00:00 2001
From: Aaron Covrig <aarcov@gmail.com>
Date: Sun, 14 Jun 2020 00:03:04 -0400
Subject: [PATCH] Modifying to expose part of the LMIC controls

---
 include/TheThingsNetwork.h | 13 +++++++++++++
 src/TheThingsNetwork.cpp   |  6 ++++++
 2 files changed, 19 insertions(+)

diff --git a/include/TheThingsNetwork.h b/include/TheThingsNetwork.h
index f579244..505b8d6 100644
--- a/include/TheThingsNetwork.h
+++ b/include/TheThingsNetwork.h
@@ -21,6 +21,19 @@
  */
 #define TTN_NOT_CONNECTED 0xff
 
+class LMIC_Controls
+{
+  public:
+    void  disableChannel (uint8_t channel);
+    void  enableSubBand(uint8_t band);
+    void  enableChannel(uint8_t channel);
+    void  disableSubBand(uint8_t band);
+    void  selectSubBand(uint8_t band);
+
+    //void  setDrTxpow   (dr_t dr, s1_t txpow);  // set default/start DR/txpow
+    //void  setAdrMode   (bit_t enabled);        // set ADR mode (if mobile turn off)
+};
+
 
 typedef uint8_t port_t;
 
diff --git a/src/TheThingsNetwork.cpp b/src/TheThingsNetwork.cpp
index 070bd3d..c4a7ba7 100644
--- a/src/TheThingsNetwork.cpp
+++ b/src/TheThingsNetwork.cpp
@@ -19,6 +19,12 @@
 #include "TTNProvisioning.h"
 #include "TTNLogging.h"
 
+void LMIC_Controls::disableChannel(uint8_t channel){ LMIC_disableChannel( channel ); }
+void LMIC_Controls::enableSubBand(uint8_t band){ LMIC_enableSubBand( band ); }
+void LMIC_Controls::enableChannel(uint8_t channel){ LMIC_enableChannel( channel ); }
+void LMIC_Controls::disableSubBand(uint8_t band){ LMIC_disableSubBand( band ); }
+void LMIC_Controls::selectSubBand(uint8_t band){ LMIC_selectSubBand( band ); }
+
 
 /**
  * @brief Reason the user code is waiting