From 6228e0945186079d4535b33354168c38f1baf7cb Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Thu, 21 Nov 2019 22:09:13 -0500 Subject: [PATCH] Moved literals to header as suggested by MartinNel --- src/Bounce2.cpp | 4 +--- src/Bounce2.h | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Bounce2.cpp b/src/Bounce2.cpp index 1400123..6509e94 100644 --- a/src/Bounce2.cpp +++ b/src/Bounce2.cpp @@ -3,9 +3,7 @@ #include "Bounce2.h" -static const uint8_t DEBOUNCED_STATE = 0b00000001; -static const uint8_t UNSTABLE_STATE = 0b00000010; -static const uint8_t CHANGED_STATE = 0b00000100; + Bounce::Bounce() diff --git a/src/Bounce2.h b/src/Bounce2.h index d2ce620..e9d05c7 100644 --- a/src/Bounce2.h +++ b/src/Bounce2.h @@ -69,6 +69,10 @@ Example of two instances of the Bounce class that switches the debug LED when either one of the two buttons is pressed. */ +static const uint8_t DEBOUNCED_STATE = 0b00000001; +static const uint8_t UNSTABLE_STATE = 0b00000010; +static const uint8_t CHANGED_STATE = 0b00000100; + /** The Bounce class. */