This library is push button or dipSw noise cancel and on/off edge recognition
Dependents: led-sound_checker clockGenerator
Fork of DigitalSw by
sample program "DigitalSW_hello" https://developer.mbed.org/users/suupen/code/DigitalSW_hello/rev/ffa16c2a347f
Diff: DigitalSw.h
- Revision:
- 2:08137bac3611
- Parent:
- 1:cd8bb4f0b08d
- Child:
- 3:ea853fc7172d
--- a/DigitalSw.h Sun Oct 23 09:46:01 2016 +0000 +++ b/DigitalSw.h Thu Oct 27 02:03:28 2016 +0000 @@ -108,11 +108,11 @@ private: - void swLevelUp(void); - void swLevelDown(void); + void swCheck(void); - - InterruptIn _sw; + Ticker _swCheckPeriod; + + DigitalIn _sw; volatile int16_t _onEdge; volatile int16_t _offEdge;