Add get_pin to bounce object

Make pin that Bounce is attached to publicly accessible
This commit is contained in:
kingjin94
2021-03-30 14:42:00 +02:00
committed by GitHub
parent f87ba5ba9f
commit d8adf30824
+9
View File
@@ -201,6 +201,15 @@ public:
attach(pin);
interval(interval_millis);
}
/**
@brief Return pin that this Bounce is attached to
@return integer identifier of the coupled pin
*/
inline int get_pin() const {
return this->pin;
};
////////////////
// Deprecated //