Each object instantiated from this class will control a GPIO pin. The GPIO pin number must be defined as static define.

#include <Gpio>

Public Member Functions

 Gpio (std::string gnum)
 
 Gpio (enum dpyUtilsGpio::Functionality)
 
 Gpio (const Gpio &b)
 
bool switchGpioOptions (boost::system::error_code &ec, const enum dpyUtilsGpio::DIRECTION dir, const enum dpyUtilsGpio::VALUE value)
 
bool createGpio (boost::system::error_code &ec)
 
bool deleteGpio (boost::system::error_code &ec)
 
bool setDirectionGpio (boost::system::error_code &ec, const enum dpyUtilsGpio::DIRECTION dir)
 
bool getDirectionGpio (boost::system::error_code &ec, enum dpyUtilsGpio::DIRECTION &dir)
 
bool setValueGpio (boost::system::error_code &ec, const dpyUtilsGpio::VALUE value)
 
bool getValueGpio (boost::system::error_code &ec, enum dpyUtilsGpio::VALUE &value)
 
bool getEdgeGpio (boost::system::error_code &ec, enum dpyUtilsGpio::EDGE &edge)
 
bool setEdgeGpio (boost::system::error_code &ec, const enum dpyUtilsGpio::EDGE edge)
 

Protected Attributes

std::string gpionum
 The gpio number that is wanted to configure.
 
Filesfile
 File Object to use GPIOs.
 

Constructor & Destructor Documentation

Gpio ( const Gpio b)

Copy constructor

Parameters
bGPIO object