Skip to content

Commit 1645b89

Browse files
author
Thomas O Fredericks
committed
Added getPin
1 parent 68dc6f7 commit 1645b89

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Bounce2.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class Debouncer
161161

162162

163163
/**
164-
@brief The Debouncer:Bounce class. Links the Deboucing class to a hardware pin.
164+
@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.
165165
166166
*/
167167
class Bounce : public Debouncer
@@ -202,6 +202,16 @@ class Bounce : public Debouncer
202202
attach(pin);
203203
interval(interval_millis);
204204
}
205+
206+
207+
/**
208+
@brief Return pin that this Bounce is attached to
209+
210+
@return integer identifier of the coupled pin
211+
*/
212+
inline int getPin() const {
213+
return this->pin;
214+
};
205215

206216
////////////////
207217
// Deprecated //

0 commit comments

Comments
 (0)