Skip to content

Commit 4fabf0d

Browse files
Update minor change commits and add one more constructor
- Minor changes request from other users - Adding one more constructor, which allow to set the pin_mode
1 parent a28938b commit 4fabf0d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ezButton.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131

3232
#include <ezButton.h>
3333

34+
ezButton::ezButton(int pin): ezButton(pin, INPUT_PULLUP) {};
35+
3436
ezButton::ezButton(int pin, int mode) {
3537
btnPin = pin;
3638
debounceTime = 0;
@@ -46,10 +48,6 @@ ezButton::ezButton(int pin, int mode) {
4648
lastDebounceTime = 0;
4749
}
4850

49-
ezButton::ezButton(int pin) {
50-
ezButton(pin, INPUT_PULLUP);
51-
}
52-
5351
void ezButton::setDebounceTime(unsigned long time) {
5452
debounceTime = time;
5553
}

0 commit comments

Comments
 (0)