hardware/button_controller.h¶
GPIO button input controller.
Three active-low buttons are intended for high-level UI control: Start -> GPIO 20 Stop -> GPIO 21 Reset -> GPIO 24
These pins intentionally avoid the mux select pins, mux signal pins, and the Pi’s I2C pins used by the OLED.
Enums
Variables
-
constexpr int DEFAULT_PIN_BUTTON_START = 20¶
-
constexpr int DEFAULT_PIN_BUTTON_STOP = 21¶
-
constexpr int DEFAULT_PIN_BUTTON_RESET = 24¶
-
class ButtonController¶
- #include <button_controller.h>
Public Functions
-
ButtonController()¶
-
ButtonController(int startPin, int stopPin, int resetPin)¶
-
~ButtonController()¶
-
bool init()¶
-
void enableSimulation()¶
-
inline bool isInitialized() const¶
-
void setSimulatedPressed(ButtonEvent button, bool pressed)¶
-
ButtonEvent poll()¶
-
const char *eventName(ButtonEvent event) const¶
Private Functions
-
bool readRaw(int index)¶
-
ButtonController()¶