Communication Class and Controller Class (ControllerForMbed Class)

Dependencies:   SoftPWM

Revision:
2:fd0c21600586
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Button.h	Thu Dec 23 08:56:26 2021 +0000
@@ -0,0 +1,23 @@
+#ifndef _BUTTON_H_INCLUDED
+#define _BUTTON_H_INCLUDED
+
+#include "mbed.h"
+#include "define.h"
+
+class Button{
+  public:
+  Button(PinName pin);
+
+  bool button_rise();
+  bool button_fall();
+  bool button_changed();
+  bool get_button_state();
+
+  private:
+  DigitalIn input;
+  
+  bool pre_button_state;
+  bool initial_flag;
+};
+
+#endif