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

Shift-out interface. More...

#include <shift-out.hpp>

+ Inheritance diagram for rpihw::iface::shiftOut:

Public Member Functions

 shiftOut (uint8_t data_pin, uint8_t clock_pin, BitOrder order, size_t delay=0)
 Constructor method. More...
virtual ~shiftOut ()
 Destructor method.
virtual void setPin (uint8_t index, uint8_t pin)
 Sets an output pin. More...
virtual void write (uint8_t data)
 Writes a data on 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-out interface.

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

Constructor & Destructor Documentation

rpihw::iface::shiftOut::shiftOut ( 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

void rpihw::iface::shiftOut::setPin ( uint8_t  index,
uint8_t  pin 

Sets an output pin.

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

Reimplemented from rpihw::iface::base.

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

virtual void rpihw::iface::shiftOut::write ( uint8_t  data)

Writes a data on the interface.

[in]dataThe data to be written.

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