This library is push button or dipSw noise cancel and on/off edge recognition

Dependents:   led-sound_checker clockGenerator

Fork of DigitalSw by suu pen

sample program "DigitalSW_hello" https://developer.mbed.org/users/suupen/code/DigitalSW_hello/rev/ffa16c2a347f

Revision:
5:9198c5c0afcb
Parent:
1:cd8bb4f0b08d
--- a/DigitalSw.h	Sun Oct 23 09:46:01 2016 +0000
+++ b/DigitalSw.h	Sat Oct 29 01:46:17 2016 +0000
@@ -74,9 +74,10 @@
 
     /** Create a DigitalSw port, connected to the specified sw pins
      *  @param sw pin
+     *  @param (option) Register pull 1:PullUp(default), 0:PullDown
      *  @note  nothing
      */
-    DigitalSw(PinName sw);
+    DigitalSw(PinName sw, uint8_t pull = 1);
 
     /**
      * Reset the edge and level.
@@ -113,6 +114,7 @@
 
 
     InterruptIn _sw;
+    int8_t _pull;
 
     volatile int16_t _onEdge;
     volatile int16_t _offEdge;