ST-DEVKIT-LRWAN

Dependents:   DISCO-L072CZ-LRWAN1-base

Fork of SX1276GenericLib by Helmut Tschemernjak

Revision:
88:d120930aeb13
Parent:
84:3428e25c7157
Child:
90:d98572047c9c
--- a/Arduino-mbed-APIs/arduino-mbed.cpp	Wed Aug 23 16:26:21 2017 +0200
+++ b/Arduino-mbed-APIs/arduino-mbed.cpp	Wed Aug 30 09:48:34 2017 +0200
@@ -235,6 +235,34 @@
     }
 }
 
+void
+InterruptIn::high(Callback<void()> func) {
+    if (func) {
+        _func = func;
+        intPtrTable[_gpioPin].context = this;
+        attachInterrupt(MYdigitalPinToInterrupt(_gpioPin), intPtrTable[_gpioPin].func, HIGH);
+    } else {
+        _func = InterruptIn::donothing;
+        intPtrTable[_gpioPin].context = NULL;
+        detachInterrupt(_gpioPin);
+    }
+}
+
+void
+InterruptIn::low(Callback<void()> func) {
+    if (func) {
+        _func = func;
+        intPtrTable[_gpioPin].context = this;
+        attachInterrupt(MYdigitalPinToInterrupt(_gpioPin), intPtrTable[_gpioPin].func, LOW);
+    } else {
+        _func = InterruptIn::donothing;
+        intPtrTable[_gpioPin].context = NULL;
+        detachInterrupt(_gpioPin);
+    }
+}
+
+
+
 
 uint32_t s_getTicker(void)
 {