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

Encoder input interface. More...

#include <encoder-in.hpp>

+ Inheritance diagram for rpihw::iface::encoderIn:

Public Member Functions

 encoderIn (std::initializer_list< uint8_t > pins)
 Constructor method. More...
 
 encoderIn (const std::vector< uint8_t > &pins)
 Constructor method. More...
 
virtual ~encoderIn ()
 Destructor method.
 
virtual size_t read () const
 Reads from the interface. More...
 
- Public Member Functions inherited from rpihw::iface::input
 input (std::initializer_list< uint8_t > pins, uint8_t pull_mode=PULL_DOWN)
 Constructor method. More...
 
 input (const std::vector< uint8_t > &pins, uint8_t pull_mode=PULL_DOWN)
 Constructor method. More...
 
virtual ~input ()
 Destructor method.
 
virtual void setPin (uint8_t index, uint8_t pin)
 Sets an input pin. More...
 
virtual bool read (uint8_t index) const
 Reads from the interface. More...
 
- Public Member Functions inherited from rpihw::iface::base
 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 uint8_t getPin (uint8_t index) const
 Returns an interface pin. More...
 
virtual uint8_t size () const
 Returns the number of the pins.
 

Additional Inherited Members

- Protected Attributes inherited from rpihw::iface::input
uint8_t m_pull_mode
 The pull resistor mode.
 
- Protected Attributes inherited from rpihw::iface::base
std::vector< uint8_t > m_pins
 Vector containing interface pins.
 
gpiom_gpio
 Virtual GPIO controller.
 

Detailed Description

Encoder input interface.

Definition at line 44 of file encoder-in.hpp.

Constructor & Destructor Documentation

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

Constructor method.

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

Constructor method.

Parameters
[in]pinsVector containing the GPIO pins.

Member Function Documentation

size_t rpihw::iface::encoderIn::read ( ) const
inlinevirtual

Reads from the interface.

Returns
The data read from the interface.

Reimplemented from rpihw::iface::input.

Definition at line 30 of file encoder-in-inl.hpp.


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