initial commit

Dependencies:   mbed

Fork of empc_pdu_v3 by gami

Revision:
1:1686fedb8e0a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SWITCH.cpp	Fri Apr 07 16:12:08 2017 +0000
@@ -0,0 +1,20 @@
+#include "SWITCH.h"
+
+SWITCH::SWITCH(PinName sw0, PinName sw1, PinName sw2, PinName sw3) : _sw0(sw0), _sw1(sw1), _sw2(sw2), _sw3(sw3)
+{
+    
+}    
+
+int SWITCH::GetMode(void)
+{
+    if (!_sw0.read()) return 1;
+    if (!_sw1.read()) return 2;
+    return 0;
+}
+
+int SWITCH::GetMove(void)
+{
+    if (!_sw2.read()) return 1;
+    if (!_sw3.read()) return 2;
+    return 0;
+}
\ No newline at end of file