Model Railroad System 2.2.2
Public Member Functions | Private Attributes | List of all members
linuxgpio::GpioInputActiveLow Class Reference

Input pin, active low (low is true). More...

Public Member Functions

 GpioInputActiveLow (name,...)
 Constructor, used to set up the GPIO pin. More...
 
 ~GpioInputActiveLow ()
 Destructor. More...
 
 Get ()
 Get the pin's logic state. More...
 

Private Attributes

 basepin
 The base pin. More...
 

Detailed Description

Input pin, active low (low is true).

Parameters
nameName of the pin.
...Options:
  • -pinnumber The pin number, readonly, defaults to 0 and can be any positive integer.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ GpioInputActiveLow()

linuxgpio::GpioInputActiveLow::GpioInputActiveLow ( name  ,
  ... 
)

Constructor, used to set up the GPIO pin.

The pin number is written to the export control file and then the pin's diection control file is computed and the pin's direction is written.

Parameters
nameThe name of the pin.
...Options:
  • -pinnumber The pin number, readonly, defaults to 0 and can be any positive integer.
Author
Robert Heller <heller@deepsoft.com>

◆ ~GpioInputActiveLow()

linuxgpio::GpioInputActiveLow::~GpioInputActiveLow ( )

Destructor.

Unexport the pin.

Member Function Documentation

◆ Get()

linuxgpio::GpioInputActiveLow::Get ( )

Get the pin's logic state.

Returns
The pin state (low is true, high is false).

Member Data Documentation

◆ basepin

linuxgpio::GpioInputActiveLow::basepin
private

The base pin.