semf
semf::app::DigitalOut Class Referenceabstract

Class for handling a digital output. More...

#include <digitalout.h>

Inheritance diagram for semf::app::DigitalOut:
Inheritance graph
Collaboration diagram for semf::app::DigitalOut:
Collaboration graph

Public Types

enum  State : bool { Low = false , High = true }
 

Public Member Functions

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...
 

Detailed Description

Class for handling a digital output.

Definition at line 23 of file digitalout.h.

Member Enumeration Documentation

◆ State

Enum for the state of the pin.

Enumerator
Low 

Pin is set to a low state

High 

Pin is set to a high state

Definition at line 27 of file digitalout.h.

Constructor & Destructor Documentation

◆ ~DigitalOut()

virtual semf::app::DigitalOut::~DigitalOut ( )
virtualdefault

Member Function Documentation

◆ reset()

virtual void semf::app::DigitalOut::reset ( )
pure virtual

Sets low level of a GPIO pin.

Implemented in semf::DigitalOut.

◆ set()

virtual void semf::app::DigitalOut::set ( State  state = High)
pure virtual

Sets the output level of a GPIO pin.

Parameters
stateThe new output level of a GPIO pin.
Note
Default is High.

Implemented in semf::DigitalOut.

◆ setInverted()

virtual void semf::app::DigitalOut::setInverted ( bool  inverted)
pure virtual

Configures the inversion of the output.

Parameters
invertedtrue sets high level of a pin as low and a low level of a pin as high.

Implemented in semf::DigitalOut.

◆ state()

virtual State semf::app::DigitalOut::state ( ) const
pure virtual

Gets the present/current state of a GPIO pin.

Returns
Present/current state of a GPIO pin.

Implemented in semf::DigitalOut.

◆ toggle()

virtual void semf::app::DigitalOut::toggle ( )
pure virtual

Toggles the output of a GPIO pin.

Implemented in semf::DigitalOut.