Fork to see if I can get working

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

Fork of xDotBridge_update_test20180823 by Matt Briggs

Files at this revision

API Documentation at this revision

Comitter:
Matt Briggs
Date:
Mon Mar 06 09:37:15 2017 -0700
Parent:
58:15aa7a785b9f
Child:
60:5179449a684f
Commit message:
Adding code to allow GPIO3 to be used as LED and added option to allow LrrLed to be used i.e. GPIO0

Changed in this revision

xDotBridge/inc/BaseboardIO.h Show annotated file Show diff for this revision Revisions of this file
xDotBridge/src/BaseboardIO.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/xDotBridge/inc/BaseboardIO.h	Wed Mar 01 17:28:32 2017 -0700
+++ b/xDotBridge/inc/BaseboardIO.h	Mon Mar 06 09:37:15 2017 -0700
@@ -13,6 +13,7 @@
 const uint16_t BASEBOARDIO_NVM_SIZE = 32; // Bytes
 const uint16_t BASEBOARDIO_FLAG = 0x5A00;
 const uint16_t BASEBOARDIO_REV = 0x0000;
+#define ALSO_USE_LRR_LED 1  // Only set to 1 for debug otherwise it is a waste of power
 
 class NvmBBIOObj {
 public:
@@ -59,7 +60,8 @@
     static const PinName CCInPinName           = WAKE; // Interrupt pin PA_0
     static const PinName TamperPinName         = GPIO1; // Interrupt pin PA_5
     static const PinName PairBtnPinName        = UART_CTS; // Interrupt pin PA_11
-    static const PinName LedPinName            = GPIO0;
+    static const PinName LedPinName            = GPIO3;
+    static const PinName LrrLedPinName         = GPIO0;
     static const PinName SwitchedIOCtrlPinName = I2C_SCL;
 
     /**
@@ -375,6 +377,7 @@
     InterruptIn mTamper;
     InterruptIn mPairBtn;
     DigitalOut mLed;
+    DigitalOut mLrrLed;
     DigitalOut mSwitchedIOCtrl;
 
 //    uint8_t mPortExpanderROM0[8]; // FIXME could probably get rid of
--- a/xDotBridge/src/BaseboardIO.cpp	Wed Mar 01 17:28:32 2017 -0700
+++ b/xDotBridge/src/BaseboardIO.cpp	Mon Mar 06 09:37:15 2017 -0700
@@ -45,6 +45,7 @@
       mTamper(TamperPinName),
       mPairBtn(PairBtnPinName),
       mLed(LedPinName),
+      mLrrLed(LrrLedPinName),
       mSwitchedIOCtrl(SwitchedIOCtrlPinName, 0)
 {
     mPortExpanderVal0 = 0x00;
@@ -252,11 +253,17 @@
 CmdResult BaseboardIO::ledOn()
 {
     mLed = 1;
+#if ALSO_USE_LRR_LED
+    mLrrLed = 1;
+#endif
     return cmdSuccess;
 }
 CmdResult BaseboardIO::ledOff()
 {
     mLed = 0;
+#if ALSO_USE_LRR_LED
+    mLrrLed = 0;
+#endif
     return cmdSuccess;
 }
 CmdResult BaseboardIO::relayAlert()