Skip to content

Commit

Permalink
Fixing bug for platform that is not support internal pull-downs
Browse files Browse the repository at this point in the history
  • Loading branch information
ArduinoGetStarted authored Aug 9, 2024
1 parent 7f5fcca commit 192d9c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ezButton
version=1.0.5
version=1.0.6
author=ArduinoGetStarted.com
maintainer=ArduinoGetStarted.com ([email protected])
sentence=Button library for Arduino, ESP32, ESP8266...
Expand Down
9 changes: 7 additions & 2 deletions src/ezButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@

// Constants for button modes
#define INTERNAL_PULLUP INPUT_PULLUP
#ifdef INPUT_PULLDOWN
#define INTERNAL_PULLDOWN INPUT_PULLDOWN
#define EXTERNAL_PULLUP 2
#define EXTERNAL_PULLDOWN 3
#else
#define INTERNAL_PULLDOWN INPUT
#endif

#define EXTERNAL_PULLUP 0xFE
#define EXTERNAL_PULLDOWN 0xFF

class ezButton
{
Expand Down

0 comments on commit 192d9c3

Please sign in to comment.