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

Shift-in interface. More...

#include <shift-in.hpp>

+ Inheritance diagram for rpihw::iface::shiftIn:

Public Member Functions

 shiftIn (uint8_t data_pin, uint8_t clock_pin, BitOrder order, size_t delay=0)
 Constructor method. More...
virtual ~shiftIn ()
 Destructor method.
virtual void setPin (uint8_t index, uint8_t pin)
 Sets an input pin. More...
virtual uint8_t read ()
 Reads from the interface. More...
- Public Member Functions inherited from rpihw::iface::shiftBase
 shiftBase (uint8_t data_pin, uint8_t clock_pin, BitOrder order, size_t delay=0)
 Constructor method. More...
virtual ~shiftBase ()
 Destructor method.
virtual void strobe ()
 Toggles the clock.
- 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

- Public Types inherited from rpihw::iface::shiftBase
enum  ShiftPins { DATA = 0, CLOCK = 1 }
 Shift interface pins. More...
enum  BitOrder { MSBFIRST = 0, LSBFIRST = 1 }
 Bit orders. More...
- Protected Attributes inherited from rpihw::iface::shiftBase
BitOrder m_order
 The order to shift out the bits.
size_t m_delay
 The delay time of the clock.
- Protected Attributes inherited from rpihw::iface::base
std::vector< uint8_t > m_pins
 Vector containing interface pins.
 Virtual GPIO controller.

Detailed Description

Shift-in interface.

Definition at line 41 of file shift-in.hpp.

Constructor & Destructor Documentation

rpihw::iface::shiftIn::shiftIn ( uint8_t  data_pin,
uint8_t  clock_pin,
BitOrder  order,
size_t  delay = 0 

Constructor method.

[in]data_pinThe data pin.
[in]clock_pinThe clock pin.
[in]orderThe bit order.
[in]delayThe delay time of the clock.

Member Function Documentation

virtual uint8_t rpihw::iface::shiftIn::read ( )

Reads from the interface.

The data read from the interface.
void rpihw::iface::shiftIn::setPin ( uint8_t  index,
uint8_t  pin 

Sets an input pin.

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

Reimplemented from rpihw::iface::base.

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

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