![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Class for coded rotary switches. More...
#include <InputHardware.hpp>
Public Member Functions | |
| RotaryCodedSwitchInput (const RotaryCodedSwitch &spec, const InputGPIOCollection &pins, bool complementaryCode) | |
| Construct a new Rotary Coded Switch Input object. | |
| virtual uint64_t | read (uint64_t lastState) override |
| Read the current state of the inputs (pressed or released) | |
Public Member Functions inherited from DigitalInput | |
Additional Inherited Members | |
Public Attributes inherited from DigitalInput | |
| uint64_t | mask = ~0ULL |
| Input mask. For read-only. | |
Protected Member Functions inherited from DigitalInput | |
| void | addToMask (uint64_t bitmap) |
| Add an input bitmap to the current mask. | |
Class for coded rotary switches.
Definition at line 283 of file InputHardware.hpp.
| RotaryCodedSwitchInput::RotaryCodedSwitchInput | ( | const RotaryCodedSwitch & | spec, |
| const InputGPIOCollection & | pins, | ||
| bool | complementaryCode ) |
Construct a new Rotary Coded Switch Input object.
| spec | Specification of input numbers assigned to switch positions |
| pins | Collection of input pins for the binary encoding |
| complementaryCode | If true, the input pins work in complementary binary encoding |
|
overridevirtual |
Read the current state of the inputs (pressed or released)
| lastState | State of the same inputs as recorded in the previous iteration. Whether the current state is unknown, lastState must be returned (properly masked). Must be set to zero at first call. |
Implements DigitalInput.