This is the default PinAdapter for regular GPIO pins.
#include <PinMixerAdapter.h>
◆ PinMixerAdapter()
Takes two PinAdapter classes and mixes their read() calls. Initial state is taken from pin1.
The mixed read() state will only change when either PinAdapter changes its read() state. ie if pin1 state changes from HIGH to LOW the read() state will change to LOW, even if pin2 state is currently HIGH. The read() state will remain LOW until either pin changes state again (eg pin1 changes to HIGH or pin2 state changes from HIGH->LOW->HIGH
- Parameters
-
◆ begin()
void PinMixerAdapter::begin |
( |
| ) |
|
|
inlinevirtual |
Initialise the pin adapter. Must be safe for repeated calls (Idempotent)
Implements PinAdapter.
◆ read()
bool PinMixerAdapter::read |
( |
| ) |
|
|
inlinevirtual |
Read the current state of the pin.
- Returns
- true/HIGH
-
false/LOW
Implements PinAdapter.
The documentation for this class was generated from the following file: