From 68dc6f7830d6a8a8ab0ad42d70896fefe5ced8c7 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Mon, 28 Jun 2021 16:33:17 -0400 Subject: [PATCH] Adding a little documentation --- src/Bounce2.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bounce2.h b/src/Bounce2.h index ff20589..86e8d61 100644 --- a/src/Bounce2.h +++ b/src/Bounce2.h @@ -63,10 +63,11 @@ class Debouncer { // Note : this is private as it migh change in the futur private: - static const uint8_t DEBOUNCED_STATE = 0b00000001; - static const uint8_t UNSTABLE_STATE = 0b00000010; - static const uint8_t CHANGED_STATE = 0b00000100; + static const uint8_t DEBOUNCED_STATE = 0b00000001; // Final returned calculated debounced state + static const uint8_t UNSTABLE_STATE = 0b00000010; // Actual last state value behind the scene + static const uint8_t CHANGED_STATE = 0b00000100; // The DEBOUNCED_STATE has changed since last update() +// Note : this is private as it migh change in the futur private: inline void changeState(); inline void setStateFlag(const uint8_t flag) {state |= flag;}