This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
ShiftRegisterOut.hpp
Go to the documentation of this file.
1 /* ✔ */
2 
3 #pragma once
4 
6 #include <Arduino.h> // MSBFIRST
7 #include <Helpers/BitArray.hpp>
8 
10 
17 template <uint8_t N>
19  public:
51  uint8_t bitOrder = MSBFIRST);
52 
58  void begin() override;
59 
63  void update() override;
64 
65  private:
66  const pin_t dataPin;
67  const pin_t clockPin;
68 };
69 
71 
72 #include "ShiftRegisterOut.ipp"
ShiftRegisterOutBase::bitOrder
const uint8_t bitOrder
Definition: ShiftRegisterOutBase.hpp:138
ShiftRegisterOut
A class for serial-in/parallel-out shift registers, like the 74HC595.
Definition: ShiftRegisterOut.hpp:18
pin_t
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
Definition: Def.hpp:17
ShiftRegisterOut::dataPin
const pin_t dataPin
Definition: ShiftRegisterOut.hpp:66
ShiftRegisterOut.ipp
BitArray.hpp
ShiftRegisterOutBase
A class for serial-in/parallel-out shift registers, like the 74HC595.
Definition: ShiftRegisterOutBase.hpp:22
ShiftRegisterOutBase::latchPin
const pin_t latchPin
Definition: ShiftRegisterOutBase.hpp:137
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
ShiftRegisterOut::begin
void begin() override
Initialize the shift register.
Definition: ShiftRegisterOut.ipp:13
ShiftRegisterOut::clockPin
const pin_t clockPin
Definition: ShiftRegisterOut.hpp:67
ShiftRegisterOutBase.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
ShiftRegisterOut::ShiftRegisterOut
ShiftRegisterOut(pin_t dataPin, pin_t clockPin, pin_t latchPin, uint8_t bitOrder=MSBFIRST)
Create a new ShiftRegisterOut object with a shift register connected to the given pins,...
Definition: ShiftRegisterOut.ipp:7
ShiftRegisterOut::update
void update() override
Write the state buffer to the physical outputs.
Definition: ShiftRegisterOut.ipp:21