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

#include <SRPI.h>

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

Public Member Functions

 SRPI ()
 
uint8_t read ()
 
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 SRPI< BITORDER, DATA_PIN, CLOCK_PIN >

Shift Register Parallel Input (SRPI) template class using GPIO.

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

Definition at line 31 of file SRPI.h.

Constructor & Destructor Documentation

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

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

Definition at line 38 of file SRPI.h.

Member Function Documentation

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

Serial input operator. Shorthand for read().

Parameters
[out]valuefrom data input signal.

Definition at line 78 of file SRPI.h.

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

Return deserialized value according to the template bit order parameter. Generates a positive clock pulse for each bit transfer.

Returns
read byte.

Definition at line 50 of file SRPI.h.

Member Data Documentation

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

Definition at line 85 of file SRPI.h.

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

Definition at line 84 of file SRPI.h.


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