Tobi's ubw test branch

Dependencies:   mavlink_bridge mbed

Fork of AIT_UWB_Range by Benjamin Hepp

Revision:
52:94688f414dcd
Parent:
50:50b8aea54a51
Child:
54:a59803fcce58
diff -r e9391d04af00 -r 94688f414dcd InterruptMultiplexer.h
--- a/InterruptMultiplexer.h	Thu Nov 26 22:24:17 2015 +0000
+++ b/InterruptMultiplexer.h	Fri Nov 27 16:17:53 2015 +0000
@@ -4,14 +4,13 @@
 #include <vector>
 #include <utility>
 
-//#include "PC.h"
-//static PC _pc(USBTX, USBRX, 115200);           // USB UART Terminal
+const PinName INTERRUPT_STATUS_PIN = NC;
 
 class InterruptMultiplexer {
 public:
 
     InterruptMultiplexer(PinName irq_pin, PinName status_pin = D2)
-        : irq(irq_pin), status(D2) {
+        : irq(irq_pin), status(INTERRUPT_STATUS_PIN) {
         if (status.is_connected())
             status = 1;
     }
@@ -26,14 +25,12 @@
 
     void enableCallback(int index) {
         if (index < isr_array.size()) {
-//            _pc.printf("Enabled %d\r\n", index);
             isr_array[index].second = true;
         }
     }
 
     void disableCallback(int index) {
         if (index < isr_array.size()) {
-//            _pc.printf("Disabled %d\r\n", index);
             isr_array[index].second = false;
         }
     }
@@ -45,7 +42,6 @@
             else
                 status = 1;
         }
-//        _pc.printf("Trigger\r\n");
         for (int i = 0; i < isr_array.size(); ++i) {
             bool enable = isr_array[i].second;
             if (enable) {
@@ -53,8 +49,6 @@
                 fptr.call();
             }
         }
-        //myled1 = 0;
-//        _pc.printf("Trigger stop\r\n");
     }
 
     int addCallback(void (*isr)(void), bool enable = true) {