From 5e100280c5f8870d3a99d9a8cd53553515aba989 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Tue, 3 Aug 2021 11:01:07 -0400 Subject: [PATCH] Updated Doxygen docs --- docs/files/_bounce2_8h_source.html | 266 +++++++++--------- docs/files/annotated.html | 2 +- docs/files/bounce_basic_8ino-example.html | 6 +- docs/files/class_bounce-members.html | 37 +-- docs/files/class_bounce.html | 97 ++++--- .../class_bounce2_1_1_button-members.html | 49 ++-- docs/files/class_bounce2_1_1_button.html | 99 +++---- docs/files/class_debouncer-members.html | 14 +- docs/files/class_debouncer.html | 74 ++--- docs/files/files.html | 1 - docs/files/functions.html | 31 +- docs/files/functions_func.html | 31 +- docs/files/hierarchy.html | 2 +- docs/files/index.html | 32 +-- docs/files/search/all_2.js | 3 +- docs/files/search/all_3.js | 3 +- docs/files/search/all_4.js | 4 +- docs/files/search/all_5.js | 3 +- docs/files/search/all_6.js | 4 +- docs/files/search/all_7.js | 6 +- docs/files/search/all_8.js | 8 +- docs/files/search/all_9.js | 2 +- docs/files/search/all_a.js | 2 +- docs/files/search/classes_0.js | 4 +- docs/files/search/classes_1.js | 2 +- docs/files/search/functions_0.js | 2 +- docs/files/search/functions_1.js | 4 +- docs/files/search/functions_2.js | 3 +- docs/files/search/functions_3.js | 3 +- docs/files/search/functions_4.js | 4 +- docs/files/search/functions_5.js | 3 +- docs/files/search/functions_6.js | 4 +- docs/files/search/functions_7.js | 4 +- docs/files/search/functions_8.js | 8 +- docs/files/search/functions_9.js | 2 +- docs/files/search/functions_a.js | 2 +- docs/files/search/namespaces_0.js | 2 +- docs/files/search/pages_0.js | 2 +- docs/files/search/variables_0.js | 2 +- 39 files changed, 439 insertions(+), 388 deletions(-) diff --git a/docs/files/_bounce2_8h_source.html b/docs/files/_bounce2_8h_source.html index b897765..c1decaf 100644 --- a/docs/files/_bounce2_8h_source.html +++ b/docs/files/_bounce2_8h_source.html @@ -119,148 +119,156 @@ $(function() {
63 {
64  // Note : this is private as it migh change in the futur
65 private:
-
66  static const uint8_t DEBOUNCED_STATE = 0b00000001;
-
67  static const uint8_t UNSTABLE_STATE = 0b00000010;
-
68  static const uint8_t CHANGED_STATE = 0b00000100;
+
66  static const uint8_t DEBOUNCED_STATE = 0b00000001; // Final returned calculated debounced state
+
67  static const uint8_t UNSTABLE_STATE = 0b00000010; // Actual last state value behind the scene
+
68  static const uint8_t CHANGED_STATE = 0b00000100; // The DEBOUNCED_STATE has changed since last update()
69 
-
70 private:
-
71  inline void changeState();
-
72  inline void setStateFlag(const uint8_t flag) {state |= flag;}
-
73  inline void unsetStateFlag(const uint8_t flag) {state &= ~flag;}
-
74  inline void toggleStateFlag(const uint8_t flag) {state ^= flag;}
-
75  inline bool getStateFlag(const uint8_t flag) {return((state & flag) != 0);}
-
76 
-
77 public:
-
83  Debouncer();
-
84 
-
92  void interval(uint16_t interval_millis);
-
93 
-
102  bool update();
-
103 
-
109  bool read();
-
110 
-
114  bool fell();
-
115 
-
119  bool rose();
-
120 
+
70 // Note : this is private as it migh change in the futur
+
71 private:
+
72  inline void changeState();
+
73  inline void setStateFlag(const uint8_t flag) {state |= flag;}
+
74  inline void unsetStateFlag(const uint8_t flag) {state &= ~flag;}
+
75  inline void toggleStateFlag(const uint8_t flag) {state ^= flag;}
+
76  inline bool getStateFlag(const uint8_t flag) const {return((state & flag) != 0);}
+
77 
+
78 public:
+
84  Debouncer();
+
85 
+
93  void interval(uint16_t interval_millis);
+
94 
+
103  bool update();
+
104 
+
110  bool read() const;
+
111 
+
115  bool fell() const;
+
116 
+
120  bool rose() const;
121 
122 
-
123 public:
-
129  bool changed( ) { return getStateFlag(CHANGED_STATE); }
-
130 
-
139  unsigned long duration();
-
140 
-
148  unsigned long previousDuration();
-
149 
-
150 protected:
-
151  void begin();
-
152  virtual bool readCurrentState() =0;
-
153  unsigned long previous_millis;
-
154  uint16_t interval_millis;
-
155  uint8_t state;
-
156  unsigned long stateChangeLastTime;
-
157  unsigned long durationOfPreviousState;
-
158 
-
159 };
+
123 
+
124 public:
+
130  bool changed( ) const { return getStateFlag(CHANGED_STATE); }
+
131 
+
140  unsigned long currentDuration() const;
+
141 
+
142 
+
150  unsigned long previousDuration() const;
+
151 
+
152 protected:
+
153  void begin();
+
154  virtual bool readCurrentState() =0;
+
155  unsigned long previous_millis;
+
156  uint16_t interval_millis;
+
157  uint8_t state;
+
158  unsigned long stateChangeLastTime;
+
159  unsigned long durationOfPreviousState;
160 
-
161 
-
166 class Bounce : public Debouncer
-
167 {
-
168 
-
169 
-
170 public:
+
161 };
+
162 
+
163 
+
168 class Bounce : public Debouncer
+
169 {
+
170 
171 
-
182  Bounce();
-
183 
-
184 
-
193  void attach(int pin, int mode);
-
194 
-
198  void attach(int pin);
-
199 
-
200  Bounce(uint8_t pin, unsigned long interval_millis ) : Bounce() {
-
201  attach(pin);
-
202  interval(interval_millis);
-
203  }
-
204 
-
206  // Deprecated //
-
208 
-
212  bool risingEdge() { return rose(); }
-
216  bool fallingEdge() { return fell(); }
-
222 protected:
-
223 
-
224 
-
225  uint8_t pin;
-
226 
-
227  virtual bool readCurrentState() { return digitalRead(pin); }
-
228  virtual void setPinMode(int pin, int mode) {
-
229 #if defined(ARDUINO_ARCH_STM32F1)
-
230  pinMode(pin, (WiringPinMode)mode);
-
231 #else
-
232  pinMode(pin, mode);
-
233 #endif
-
234  }
+
172 public:
+
173 
+
184  Bounce();
+
185 
+
186 
+
195  void attach(int pin, int mode);
+
196 
+
200  void attach(int pin);
+
201 
+
202  Bounce(uint8_t pin, unsigned long interval_millis ) : Bounce() {
+
203  attach(pin);
+
204  interval(interval_millis);
+
205  }
+
206 
+
207 
+
213  inline int getPin() const {
+
214  return this->pin;
+
215  };
+
216 
+
218  // Deprecated //
+
220 
+
224  bool risingEdge() const { return rose(); }
+
228  bool fallingEdge() const { return fell(); }
+
234 protected:
235 
236 
-
237 
-
238 };
-
239 
-
243 namespace Bounce2 {
-
244  // code declarations
-
245 
-
246 class Button : public Bounce{
-
247 protected:
-
248  bool stateForPressed = 1; //
-
249  public:
-
260  Button(){ }
-
261 
-
269  void setPressedState(bool state){
-
270  stateForPressed = state;
-
271  }
-
272 
-
276  inline bool getPressedState() {
-
277  return stateForPressed;
-
278  };
-
279 
-
283  inline bool isPressed() {
-
284  return read() == getPressedState();
-
285  };
-
286 
-
290  inline bool pressed() {
-
291  return changed() && isPressed();
-
292  };
-
293 
-
297  inline bool released() {
-
298  return changed() && !isPressed();
-
299  };
-
300 
-
301 };
-
302 };
-
303 
-
304 #endif
+
237  uint8_t pin;
+
238 
+
239  virtual bool readCurrentState() { return digitalRead(pin); }
+
240  virtual void setPinMode(int pin, int mode) {
+
241 #if defined(ARDUINO_ARCH_STM32F1)
+
242  pinMode(pin, (WiringPinMode)mode);
+
243 #else
+
244  pinMode(pin, mode);
+
245 #endif
+
246  }
+
247 
+
248 
+
249 
+
250 };
+
251 
+
255 namespace Bounce2 {
+
256  // code declarations
+
257 
+
258 class Button : public Bounce{
+
259 protected:
+
260  bool stateForPressed = 1; //
+
261  public:
+
272  Button(){ }
+
273 
+
281  void setPressedState(bool state){
+
282  stateForPressed = state;
+
283  }
+
284 
+
288  inline bool getPressedState() const {
+
289  return stateForPressed;
+
290  };
+
291 
+
295  inline bool isPressed() const {
+
296  return read() == getPressedState();
+
297  };
+
298 
+
302  inline bool pressed() const {
+
303  return changed() && isPressed();
+
304  };
+
305 
+
309  inline bool released() const {
+
310  return changed() && !isPressed();
+
311  };
+
312 
+
313 };
+
314 };
+
315 
+
316 #endif
-
Definition: Bounce2.h:246
-
bool getPressedState()
Get the electrical state (HIGH/LOW) that corresponds to a physical press.
Definition: Bounce2.h:276
-
bool fell()
Returns true if pin signal transitions from high to low.
Definition: Bounce2.cpp:128
+
Definition: Bounce2.h:258
void interval(uint16_t interval_millis)
Sets the debounce interval in milliseconds.
Definition: Bounce2.cpp:14
-
bool read()
Returns the pin's state (HIGH or LOW).
Definition: Bounce2.cpp:118
+
unsigned long previousDuration() const
Returns the duration in milliseconds of the previous state.
Definition: Bounce2.cpp:103
+
bool getPressedState() const
Get the electrical state (HIGH/LOW) that corresponds to a physical press.
Definition: Bounce2.h:288
Bounce()
Create an instance of the Bounce class.
Definition: Bounce2.cpp:138
-
bool changed()
Returns true if the state changed on last update.
Definition: Bounce2.h:129
-
unsigned long duration()
Returns the duration in milliseconds of the current state.
Definition: Bounce2.cpp:107
-
bool rose()
Returns true if pin signal transitions from low to high.
Definition: Bounce2.cpp:123
-
uint8_t pin
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:225
-
bool released()
Returns true if the button was physically released
Definition: Bounce2.h:297
-
bool isPressed()
Returns true if the button is currently physically pressed.
Definition: Bounce2.h:283
-
bool risingEdge()
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:212
+
bool fallingEdge() const
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:228
+
bool rose() const
Returns true if pin signal transitions from low to high.
Definition: Bounce2.cpp:123
+
uint8_t pin
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:237
+
bool pressed() const
Returns true if the button was physically pressed
Definition: Bounce2.h:302
+
unsigned long currentDuration() const
Returns the duration in milliseconds of the current state.
Definition: Bounce2.cpp:107
bool update()
Updates the pin's state.
Definition: Bounce2.cpp:32
-
Button()
Create an instance of the Button class. By default, the pressed state is matched to a HIGH electrical...
Definition: Bounce2.h:260
-
bool pressed()
Returns true if the button was physically pressed
Definition: Bounce2.h:290
-
unsigned long previousDuration()
Returns the duration in milliseconds of the previous state.
Definition: Bounce2.cpp:103
-
The Debouncer:Bounce class. Links the Deboucing class to a hardware pin.
Definition: Bounce2.h:166
+
Button()
Create an instance of the Button class. By default, the pressed state is matched to a HIGH electrical...
Definition: Bounce2.h:272
+
The Debouncer:Bounce class. Links the Deboucing class to a hardware pin. This class is odly named,...
Definition: Bounce2.h:168
+
int getPin() const
Return pin that this Bounce is attached to.
Definition: Bounce2.h:213
The Debouce class. Just the deboucing code separated from all harware.
Definition: Bounce2.h:62
-
void setPressedState(bool state)
Set the electrical state (HIGH/LOW) that corresponds to a physical press. By default,...
Definition: Bounce2.h:269
-
bool fallingEdge()
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:216
+
void setPressedState(bool state)
Set the electrical state (HIGH/LOW) that corresponds to a physical press. By default,...
Definition: Bounce2.h:281
+
bool fell() const
Returns true if pin signal transitions from high to low.
Definition: Bounce2.cpp:128
+
bool released() const
Returns true if the button was physically released
Definition: Bounce2.h:309
void attach(int pin, int mode)
Attach to a pin and sets that pin's mode (INPUT, INPUT_PULLUP or OUTPUT).
Definition: Bounce2.cpp:149
-
The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action.
Definition: Bounce2.h:243
+
bool isPressed() const
Returns true if the button is currently physically pressed.
Definition: Bounce2.h:295
+
bool read() const
Returns the pin's state (HIGH or LOW).
Definition: Bounce2.cpp:118
+
bool risingEdge() const
Deprecated (i.e. do not use). Included for partial compatibility for programs written with Bounce ver...
Definition: Bounce2.h:224
+
bool changed() const
Returns true if the state changed on last update.
Definition: Bounce2.h:130
+
The Debouncer:Bounce:Button class. The Button class matches an electrical state to a physical action.
Definition: Bounce2.h:255
Debouncer()
Create an instance of the Debounce class.
Definition: Bounce2.cpp:10