|
RBE1001Lib
|
#include <button.h>
Public Member Functions | |
| Button (uint8_t pin, uint32_t db=10) | |
| void | Init (bool usePullup=true) |
| bool | CheckButtonPress (void) |
Private Types | |
| enum | BUTTON_STATE { BUTTON_STABLE, BUTTON_UNSTABLE } |
Private Attributes | |
| BUTTON_STATE | state = BUTTON_STABLE |
| uint8_t | buttonPin = -1 |
| uint8_t | activeState = LOW |
| uint8_t | stabButtonPos = HIGH |
| uint8_t | tempButtonPos = HIGH |
| uint32_t | lastBounceTime = 0 |
| uint32_t | debouncePeriod = 10 |
|
private |
| Button::Button | ( | uint8_t | pin, |
| uint32_t | db = 10 |
||
| ) |
Definition at line 3 of file button.cpp.
References buttonPin, debouncePeriod, and pin.
| bool Button::CheckButtonPress | ( | void | ) |
Definition at line 17 of file button.cpp.
References activeState, BUTTON_STABLE, BUTTON_UNSTABLE, buttonPin, debouncePeriod, lastBounceTime, stabButtonPos, state, and tempButtonPos.
| void Button::Init | ( | bool | usePullup = true | ) |
Definition at line 9 of file button.cpp.
References buttonPin, stabButtonPos, and tempButtonPos.
|
private |
Definition at line 25 of file button.h.
Referenced by CheckButtonPress().
|
private |
Definition at line 24 of file button.h.
Referenced by Button(), CheckButtonPress(), and Init().
|
private |
Definition at line 31 of file button.h.
Referenced by Button(), and CheckButtonPress().
|
private |
Definition at line 30 of file button.h.
Referenced by CheckButtonPress().
|
private |
Definition at line 27 of file button.h.
Referenced by CheckButtonPress(), and Init().
|
private |
Definition at line 22 of file button.h.
Referenced by CheckButtonPress().
|
private |
Definition at line 28 of file button.h.
Referenced by CheckButtonPress(), and Init().
1.8.13