This is a debounced version of DigitalIn for Mechanical Switches. It is simplistic, and should be easy to use.
DebouncedIn.h
- Committer:
- mr63
- Date:
- 2013-08-16
- Revision:
- 0:323110faffe5
File content as of revision 0:323110faffe5:
#include "mbed.h" class DebouncedIn { public: DebouncedIn(PinName pin); bool get(); void CheckState(); bool get_pin(); private : // objects DigitalIn _pin; Ticker _poll; };