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:
57:bdac7dd17af2
Parent:
56:40b454c952cc
Child:
58:15aa7a785b9f
--- a/xDotBridge/src/BaseboardIO.cpp	Mon Feb 27 14:06:54 2017 -0700
+++ b/xDotBridge/src/BaseboardIO.cpp	Tue Feb 28 09:26:27 2017 -0700
@@ -119,17 +119,17 @@
         logInfo("PortEx1 Control register reads %02X", val);
     }
 
+    if (sampleUserSwitches() != cmdSuccess) {
+        logError("Error sampling user switches");
+        return cmdError;
+    }
+
     // Put relay in known state
     if (relayNormal() != cmdSuccess) {
         logError("Error setting relay during init");
         return cmdError;
     }
 
-    if (sampleUserSwitches() != cmdSuccess) {
-        logError("Error sampling user switches");
-        return cmdError;
-    }
-
     logInfo("Baseboard IO initialization successful");
     return cmdSuccess;
 }
@@ -185,6 +185,15 @@
     disableSwitchedIO();
     return cmdSuccess;
 }
+bool BaseboardIO::isCCInAlert()
+{
+    if (isCCNO()) { // If NO then the CCIn should float high if not in alert state
+        return mCCIn == 0;
+    }
+    else { // If NC then the CCIN should be held low if not in alert state
+        return mCCIn == 1;
+    }
+}
 bool BaseboardIO::isPairBtn()
 {
     // Depressed button is high