![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
State of switches connected to PISO shift registers. More...
#include <InputHardware.hpp>
Public Member Functions | |
| ShiftRegistersInput (OutputGPIO loadPin, OutputGPIO nextPin, InputGPIO inputPin, const ShiftRegisterChain &chain, InputNumber SER_inputNumber=UNSPECIFIED::VALUE, const bool loadHighOrLow=false, const bool nextHighToLowOrLowToHigh=false, const bool negativeLogic=true) | |
| Construct a new Shift Registers 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. | |
State of switches connected to PISO shift registers.
Definition at line 399 of file InputHardware.hpp.
| ShiftRegistersInput::ShiftRegistersInput | ( | OutputGPIO | loadPin, |
| OutputGPIO | nextPin, | ||
| InputGPIO | inputPin, | ||
| const ShiftRegisterChain & | chain, | ||
| InputNumber | SER_inputNumber = UNSPECIFIED::VALUE, | ||
| const bool | loadHighOrLow = false, | ||
| const bool | nextHighToLowOrLowToHigh = false, | ||
| const bool | negativeLogic = true ) |
Construct a new Shift Registers Input object.
| loadPin | GPIO number of the load pin |
| nextPin | GPIO number of the next/clock pin |
| inputPin | GPIO number of the serial output pin |
| chain | Chain of PISO shift registers |
| SER_inputNumber | Input number assigned to the SER pin in the last chip of the chain. |
| loadHighOrLow | If true, parallel inputs are loaded when loadPinis HIGH. If false, parallel inputs are loaded when loadPinis LOW. |
| nextHighToLowOrLowToHigh | If true, next bit is selected when an high-to-low pulse is detected at nextPin. If false, next bit is selected when a low-to-high pulse is detected. |
| negativeLogic | If true, all switches must be pulled down (the default), If false, all switches must be pulled up (positive logic). |
|
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.