Skip to content

Commit

Permalink
Added getPin
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas O Fredericks committed Jun 28, 2021
1 parent 68dc6f7 commit 1645b89
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Bounce2.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Debouncer


/**
@brief The Debouncer:Bounce class. Links the Deboucing class to a hardware pin.
@brief The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. This class is odly named, but it will be kept that so it stays compatible with previous code.
*/
class Bounce : public Debouncer
Expand Down Expand Up @@ -202,6 +202,16 @@ class Bounce : public Debouncer
attach(pin);
interval(interval_millis);
}


/**
@brief Return pin that this Bounce is attached to
@return integer identifier of the coupled pin
*/
inline int getPin() const {
return this->pin;
};

////////////////
// Deprecated //
Expand Down

0 comments on commit 1645b89

Please sign in to comment.