semf
|
Class for handling a digital output. More...
#include <digitalout.h>
Public Member Functions | |
DigitalOut (Gpio &gpio, bool inverted=false) | |
Constructor. More... | |
DigitalOut (const DigitalOut &other)=delete | |
void | setInverted (bool inverted) override |
Configures the inversion of the output. More... | |
void | set (State state=High) override |
Sets the output level of a GPIO pin. More... | |
void | reset () override |
void | toggle () override |
State | state () const override |
Gets the present/current state of a GPIO pin. More... | |
Public Member Functions inherited from semf::app::DigitalOut | |
virtual | ~DigitalOut ()=default |
virtual void | setInverted (bool inverted)=0 |
Configures the inversion of the output. More... | |
virtual void | set (State state=High)=0 |
Sets the output level of a GPIO pin. More... | |
virtual void | reset ()=0 |
virtual void | toggle ()=0 |
virtual State | state () const =0 |
Gets the present/current state of a GPIO pin. More... | |
Additional Inherited Members | |
Public Types inherited from semf::app::DigitalOut | |
enum | State : bool { Low = false , High = true } |
Class for handling a digital output.
Definition at line 21 of file digitalout.h.
|
explicit |
Constructor.
gpio | GPIO interface object for hardware access. |
inverted | true sets high level of a pin as low and low level of a pin as high. |
Definition at line 15 of file digitalout.cpp.
|
explicitdelete |
|
overridevirtual |
Sets low level of a GPIO pin.
Implements semf::app::DigitalOut.
Definition at line 57 of file digitalout.cpp.
Sets the output level of a GPIO pin.
state | The new output level of a GPIO pin. |
High
. Implements semf::app::DigitalOut.
Definition at line 27 of file digitalout.cpp.
|
overridevirtual |
Configures the inversion of the output.
inverted | true sets high level of a pin as low and a low level of a pin as high. |
Implements semf::app::DigitalOut.
Definition at line 21 of file digitalout.cpp.
|
overridevirtual |
Gets the present/current state of a GPIO pin.
Implements semf::app::DigitalOut.
Definition at line 68 of file digitalout.cpp.
|
overridevirtual |
Toggles the output of a GPIO pin.
Implements semf::app::DigitalOut.
Definition at line 62 of file digitalout.cpp.