Minh Nguyen / Pushbutton
Revision:
9:7dd8100b2ba5
Parent:
4:3f905ce43f2b
--- a/Pushbutton.h	Wed Mar 17 20:09:13 2021 +0000
+++ b/Pushbutton.h	Wed Mar 24 01:47:27 2021 +0000
@@ -9,19 +9,20 @@
     public:
     //Constructor
     Pushbutton(PinName bt);
-    Pushbutton(PinName pin, int* state, int* flag);
+    Pushbutton(PinName pin, int* state, int* flag, PinName bt2);
     
     //Methods
     int read();
+    void setConnected(bool con);
     
     private:
     //Variables
-    DigitalIn button;
+    DigitalIn button,button2;
     InterruptIn buttonInt;
     static DigitalIn lastPressed;
-    int busy;
     int *mode;
     int *flag;
+    bool connected = false;
     
     void updateMode();
 };