1#ifndef VirtualPinAdapter_h
2#define VirtualPinAdapter_h
20 : pressedState(pressedState)
27 state = !pressedState;
51 state = !pressedState;
64 bool pressedState = LOW;
The interface specification for button, encoder button and switch pins.
Definition: PinAdapter.h:8
A PinAdapter that can set state programtically.
Definition: VirtualPinAdapter.h:11
void begin()
Sets the iniial state.
Definition: VirtualPinAdapter.h:26
void setState(bool newState)
Directly set the state.
Definition: VirtualPinAdapter.h:59
bool read()
Returns the current state.
Definition: VirtualPinAdapter.h:36
void release()
Set the state to 'not pressedState'.
Definition: VirtualPinAdapter.h:50
void press()
Set the state to pressedState.
Definition: VirtualPinAdapter.h:43
VirtualPinAdapter(bool pressedState=LOW)
Construct a VirtualPinAdapter.
Definition: VirtualPinAdapter.h:19