OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
DigitalInput Class Referenceabstract

Base class for all polled switches. More...

#include <InputHardware.hpp>

Public Member Functions

virtual void read (uint128_t &state)=0
 Read the current state of the inputs (pressed or released)
 

Detailed Description

Base class for all polled switches.

Note
Instances of this base class are supposed to live forever.

Definition at line 32 of file InputHardware.hpp.

Constructor & Destructor Documentation

◆ ~DigitalInput()

virtual DigitalInput::~DigitalInput ( )
inlinevirtualnoexcept

Definition at line 35 of file InputHardware.hpp.

Member Function Documentation

◆ read()

virtual void DigitalInput::read ( uint128_t & state)
pure virtual

Read the current state of the inputs (pressed or released)

Warning
This function must not set or clear any bit outside of the input bitmask in the return value.
Parameters
[in,out]stateAt call, state of all inputs as recorded in the previous iteration. Whether the current state is unknown, state must be kept untouched. At return, new state of the inputs.

Implemented in AnalogJoystickInput, AnalogMultiplexerInput, ButtonMatrixInput, DigitalButton, FakeDigitalInput, MCP23017ButtonsInput, PCF8574ButtonsInput, RotaryEncoderInput, and ShiftRegistersInput.


The documentation for this class was generated from the following file: