Communication Class and Controller Class (ControllerForMbed Class)

Dependencies:   SoftPWM

Button.h

Committer:
kikuchi8810
Date:
2021-12-23
Revision:
2:fd0c21600586

File content as of revision 2:fd0c21600586:

#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