aa

Dependencies:   mbed

Revision:
0:2e7a61458dc3
Child:
1:e1e9671724e7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Input/Switch/Switch.cpp	Mon Jan 28 08:34:36 2019 +0000
@@ -0,0 +1,22 @@
+#include "Switch.h"
+#include <stdint.h>
+
+DigitalIn limitSw[] = {
+    DigitalIn(LIMITSW0_PIN),
+    DigitalIn(LIMITSW1_PIN),
+    DigitalIn(LIMITSW2_PIN),
+    DigitalIn(LIMITSW3_PIN),
+};
+
+namespace SWITCH 
+{
+    void Switch::Initialize(void){
+        for(int i = 0 ; i < MOUNTING_LIMITSW_NUM; i++){
+            limitSw[i].mode(PullUp);
+        }
+    }
+    
+    bool Switch::CheckPushed(int SwitchNumber){
+        return SwitchNumber ? false : true ;
+    }
+}
\ No newline at end of file