92 void write(
bool new_state)
const
107 return read() == SET;
115 return read() == CLR;
120 virtual void set()
const = 0;
124 virtual void clr()
const = 0;
OS-independent abstraction for GPIO.
virtual void write(Value new_state) const =0
Writes a GPIO output pin (set or clear to a specific state).
virtual Direction direction() const =0
Gets the GPIO direction.
bool is_set() const
Tests the GPIO input pin to see if it is set.
virtual void clr() const =0
Clears the GPIO output pin to low.
Value
Defines the options for GPIO level.
virtual void set_direction(Direction dir) const =0
Sets the GPIO direction.
void write(bool new_state) const
Writes a GPIO output pin (set or clear to a specific state).
bool is_clr() const
Tests the GPIO input pin to see if it is clear.
constexpr Gpio()
Constructor.
virtual void set() const =0
Sets the GPIO output pin to high.
Direction
Defines the options for GPIO direction.
virtual Value read() const =0
Retrieves the current Value of a GPIO input pin.