From 1645b897c8319bbbed8a038c752faced3614dbe9 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Mon, 28 Jun 2021 16:41:16 -0400 Subject: [PATCH] Added getPin --- src/Bounce2.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Bounce2.h b/src/Bounce2.h index 86e8d61..fad17d2 100644 --- a/src/Bounce2.h +++ b/src/Bounce2.h @@ -161,7 +161,7 @@ protected: /** -@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 @@ -202,6 +202,16 @@ public: 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 //