Fork to see if I can get working

Dependencies:   BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated

Fork of xDotBridge_update_test20180823 by Matt Briggs

Revision:
39:64f79fa6e3cc
Parent:
38:8a512e23d99e
Child:
40:2ec4be320961
--- a/xDotBridge/src/main.cpp	Thu Jan 26 16:23:45 2017 -0700
+++ b/xDotBridge/src/main.cpp	Thu Jan 26 17:27:05 2017 -0700
@@ -63,6 +63,12 @@
 
 Serial pc(USBTX, USBRX);
 
+unsigned int callbackTime = 0;
+
+void testCallback () {
+    callbackTime = us_ticker_read();
+}
+
 int main() {
     unsigned int wakeMode;
     RadioEvent events;  // Custom event handler for automatically displaying RX data
@@ -184,6 +190,10 @@
     uint16_t seqNum=0;
     uint32_t cDwnLink = dot->getDownLinkCounter();
 
+    // Interrupt setup
+    intTest.pullup();
+    intTest.fall(testCallback);
+
     while (true) {
         std::vector<uint8_t> data;
         led1=0;
@@ -260,6 +270,7 @@
         //////////////
 
         // Check interrupt
+        logInfo("Callback last called @ %d", callbackTime);
 
 //        // Check Analog
 //        logInfo("Read AN1/GPIO1: %f", an1.read());
@@ -293,8 +304,8 @@
 //		uartOut1 = !uartOut1;
 //		uartOut2 = !uartOut2;
 
-//        logInfo("================================");
-//		wait(1.0);
+        logInfo("================================");
+		wait(1.0);
         //////////////////
         // OneWire Play //
         //////////////////