Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
rpihw::iface::base Class Reference

Generic interface. More...

#include <base.hpp>

+ Inheritance diagram for rpihw::iface::base:

Public Member Functions

 base (std::initializer_list< uint8_t > pins)
 Constructor method. More...
 
 base (const std::vector< uint8_t > &pins)
 Constructor method. More...
 
virtual ~base ()
 Destructor method.
 
virtual void setPin (uint8_t index, uint8_t pin)
 Sets an interface pin. More...
 
virtual uint8_t getPin (uint8_t index) const
 Returns an interface pin. More...
 
virtual uint8_t size () const
 Returns the number of the pins.
 

Protected Attributes

std::vector< uint8_t > m_pins
 Vector containing interface pins.
 
gpiom_gpio
 Virtual GPIO controller.
 

Detailed Description

Generic interface.

Definition at line 48 of file base.hpp.

Constructor & Destructor Documentation

rpihw::iface::base::base ( std::initializer_list< uint8_t >  pins)

Constructor method.

Parameters
[in]pinsSequence of uint8_t containing the GPIO pins.
rpihw::iface::base::base ( const std::vector< uint8_t > &  pins)

Constructor method.

Parameters
[in]pinsVector containing the GPIO pins.

Member Function Documentation

uint8_t rpihw::iface::base::getPin ( uint8_t  index) const
inlinevirtual

Returns an interface pin.

Parameters
[in]indexThe index position of the interface pin.
Returns
The GPIO pin.

Definition at line 30 of file base-inl.hpp.

virtual void rpihw::iface::base::setPin ( uint8_t  index,
uint8_t  pin 
)
virtual

Sets an interface pin.

Parameters
[in]indexThe index position of the interface pin.
[in]pinThe new GPIO pin.

Reimplemented in rpihw::iface::input, rpihw::iface::output, rpihw::iface::shiftIn, and rpihw::iface::shiftOut.


The documentation for this class was generated from the following files: