Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Revision:
6:6a04210a3f4f
Parent:
0:e516fcccccda
Child:
7:5f6e31faa08e
--- a/PollSwitch/PollSwitch.h	Wed Oct 08 20:56:41 2014 +0000
+++ b/PollSwitch/PollSwitch.h	Fri Oct 10 20:24:22 2014 +0000
@@ -1,7 +1,7 @@
-#include"LPCDigitalOut.h"
-#include"LPCDigitalIn.h"
+#include "LPCDigitalOut.h"
+#include "LPCDigitalIn.h"
 
-//Serial pc(USBTX,USBRX);
+
 
 uint16_t PollSwitch()
 {
@@ -21,13 +21,10 @@
                                 LPCDigitalOut(PollPin[10]),
                                 LPCDigitalOut(PollPin[11])};
     
-    /*
-    _(invariant each iteration input is mode neither)
-    _(ensures all are inputs mode neither)
-    _(at a time only one is ioutput)
-    */
-    
-    for(i=0; i<11; i++){
+    // poll each switch 1 at a time
+    // first failed switch is returned
+
+    for(i=0; i<11; i++){       
         ++switchn;
        
         poll[i].write(1);