Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
SRPO< BITORDER, DATA_PIN, CLOCK_PIN > Class Template Reference

#include <SRPO.h>

Collaboration diagram for SRPO< BITORDER, DATA_PIN, CLOCK_PIN >:
Collaboration graph

Public Member Functions

 SRPO ()
 
void write (uint8_t value)
 
void operator<< (uint8_t value)
 

Protected Attributes

GPIO< DATA_PINm_data
 
GPIO< CLOCK_PINm_clock
 

Detailed Description

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
class SRPO< BITORDER, DATA_PIN, CLOCK_PIN >

Shift Register Parallel Output (SRPO) template class using GPIO.

Parameters
[in]BITORDERLSBFIRST or MSBFIRST.
[in]DATA_PINboard pin for data output signal.
[in]CLOCK_PINboard pin for clock output signal.

Definition at line 31 of file SRPO.h.

Constructor & Destructor Documentation

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
SRPO< BITORDER, DATA_PIN, CLOCK_PIN >::SRPO ( )
inline

Construct Shift Register Parallel Output (SRPO) instance with given template parameters. Initiate GPIO pins for data and clock to output mode.

Definition at line 38 of file SRPO.h.

Member Function Documentation

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
void SRPO< BITORDER, DATA_PIN, CLOCK_PIN >::operator<< ( uint8_t  value)
inline

Serial output operator. Shorthand for write().

Parameters
[in]valueto data output signal.

Definition at line 75 of file SRPO.h.

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
void SRPO< BITORDER, DATA_PIN, CLOCK_PIN >::write ( uint8_t  value)
inline

Serialize given value according to the template bit order parameter. Generate a positive clock pulse for each bit transfer.

Parameters
[in]valueto data output signal.

Definition at line 49 of file SRPO.h.

Member Data Documentation

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
GPIO<CLOCK_PIN> SRPO< BITORDER, DATA_PIN, CLOCK_PIN >::m_clock
protected

Definition at line 82 of file SRPO.h.

template<uint8_t BITORDER, BOARD::pin_t DATA_PIN, BOARD::pin_t CLOCK_PIN>
GPIO<DATA_PIN> SRPO< BITORDER, DATA_PIN, CLOCK_PIN >::m_data
protected

Definition at line 81 of file SRPO.h.


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