Oscar Schofield / Mbed 2 deprecated Elec350_OBS

Dependencies:   mbed

Revision:
2:e3cd1e0c3b78
Parent:
1:16b0f2898739
Child:
3:8dca756d9804
diff -r 16b0f2898739 -r e3cd1e0c3b78 button.cpp
--- a/button.cpp	Thu Oct 15 11:20:49 2015 +0000
+++ b/button.cpp	Thu Oct 15 11:38:52 2015 +0000
@@ -7,14 +7,6 @@
     }
 }
 
-bool Button::ifPressed();{
-    int ButtonPress = read();
-    
-    if (ButtonPress==1){
-        return true;
-    
-        else{
-            return false;
-        }
-    }
+bool Button::ifPressed(){
+    return *pin;
 }
\ No newline at end of file