rusEFI
The most advanced open source ECU
|
#include <debounce.h>
Public Member Functions | |
ButtonDebounce (const char *name) | |
void | init (efitimems_t threshold, brain_pin_e &pin, pin_input_mode_e &mode, bool inverted=false) |
void | stopConfiguration () |
void | startConfiguration () |
bool | readPinEvent () |
bool | readPinState () |
bool | readPinState2 (bool valueWithinThreshold) |
bool | getPhysicalState () |
Static Public Member Functions | |
static void | stopConfigurationList () |
static void | startConfigurationList () |
static void | debug () |
static void | resetForUnitTests () |
Private Attributes | |
const char *const | m_name |
efidur_t | m_threshold |
Timer | timeLast |
brain_pin_e * | m_pin |
brain_pin_e | active_pin = Gpio::Unassigned |
pin_input_mode_e * | m_mode |
pin_input_mode_e | active_mode = PI_DEFAULT |
bool | storedValue = false |
bool | m_inverted = false |
bool | isInstanceRegisteredInGlobalList = false |
bool | needsPinInitialization = true |
ButtonDebounce * | nextDebounce = nullptr |
Static Private Attributes | |
static ButtonDebounce * | s_firstDebounce = nullptr |
Definition at line 16 of file debounce.h.
|
explicit |
Definition at line 15 of file debounce.cpp.
|
static |
bool ButtonDebounce::getPhysicalState | ( | ) |
Referenced by slowStartStopButtonCallback(), and stopConfiguration().
void ButtonDebounce::init | ( | efitimems_t | threshold, |
brain_pin_e & | pin, | ||
pin_input_mode_e & | mode, | ||
bool | inverted = false |
||
) |
We need to have a separate init function because we do not have the pin or mode in the context in which the class is originally created
Definition at line 23 of file debounce.cpp.
Referenced by ButtonShiftController::init(), initSensors(), and initStartStopButton().
bool ButtonDebounce::readPinEvent | ( | ) |
Referenced by slowStartStopButtonCallback(), stopConfiguration(), and ButtonShiftController::update().
bool ButtonDebounce::readPinState | ( | ) |
|
inlinestatic |
Definition at line 30 of file debounce.h.
void ButtonDebounce::startConfiguration | ( | ) |
Referenced by init(), startConfigurationList(), and stopConfiguration().
|
static |
Definition at line 49 of file debounce.cpp.
Referenced by applyNewHardwareSettings().
void ButtonDebounce::stopConfiguration | ( | ) |
Definition at line 59 of file debounce.cpp.
Referenced by stopConfigurationList().
|
static |
Definition at line 39 of file debounce.cpp.
Referenced by applyNewHardwareSettings().
|
private |
Definition at line 41 of file debounce.h.
Referenced by stopConfiguration().
|
private |
Definition at line 39 of file debounce.h.
Referenced by stopConfiguration().
|
private |
Definition at line 44 of file debounce.h.
Referenced by init().
|
private |
Definition at line 43 of file debounce.h.
Referenced by init(), and stopConfiguration().
|
private |
Definition at line 40 of file debounce.h.
Referenced by init(), and stopConfiguration().
|
private |
Definition at line 35 of file debounce.h.
Referenced by stopConfiguration().
|
private |
Definition at line 38 of file debounce.h.
Referenced by init(), and stopConfiguration().
|
private |
Definition at line 36 of file debounce.h.
Referenced by init(), and stopConfiguration().
|
private |
Definition at line 45 of file debounce.h.
Referenced by stopConfiguration().
|
private |
Definition at line 46 of file debounce.h.
Referenced by init(), startConfigurationList(), stopConfiguration(), and stopConfigurationList().
|
staticprivate |
Definition at line 47 of file debounce.h.
Referenced by init(), resetForUnitTests(), startConfigurationList(), stopConfiguration(), and stopConfigurationList().
|
private |
Definition at line 42 of file debounce.h.
Referenced by stopConfiguration().
|
private |
Definition at line 37 of file debounce.h.
Referenced by stopConfiguration().