1#ifndef GpioPinAdapter_h
2#define GpioPinAdapter_h
33 pinMode(buttonPin, _pinMode);
39 delayMicroseconds(2000);
43 return digitalRead(buttonPin);
48 uint8_t _pinMode = INPUT_PULLUP;
This is the default PinAdapter for regular GPIO pins.
Definition: GpioPinAdapter.h:11
bool read()
Read the current state of the pin.
Definition: GpioPinAdapter.h:42
void begin()
Initialise the pin adapter. Must be safe for repeated calls (Idempotent)
Definition: GpioPinAdapter.h:32
GpioPinAdapter(byte pin, uint8_t mode=INPUT_PULLUP)
Construct a new Gpio Pin Adapter.
Definition: GpioPinAdapter.h:27
The interface specification for button, encoder button and switch pins.
Definition: PinAdapter.h:8