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

Shift base interface. More...

#include <shift-base.hpp>

+ Inheritance diagram for rpihw::iface::shiftBase:

Public Types

enum  ShiftPins { DATA = 0, CLOCK = 1 }
 Shift interface pins. More...
 
enum  BitOrder { MSBFIRST = 0, LSBFIRST = 1 }
 Bit orders. More...
 

Public Member Functions

 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 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

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.
 
gpiom_gpio
 Virtual GPIO controller.
 

Detailed Description

Shift base interface.

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

Member Enumeration Documentation

Bit orders.

Enumerator
MSBFIRST 

Most significant bit first.

LSBFIRST 

Least significant bit first.

Definition at line 53 of file shift-base.hpp.

Shift interface pins.

Enumerator
DATA 

The data pin.

CLOCK 

The clock pin.

Definition at line 46 of file shift-base.hpp.

Constructor & Destructor Documentation

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

Constructor method.

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

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