This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
SPIShiftRegisterOut.hpp
Go to the documentation of this file.
1 /* ✔ */
2 
3 #pragma once
4 
6 #include <Arduino.h> // MSBFIRST, SS
7 #include <Helpers/BitArray.hpp>
8 
10 
22 template <uint8_t N>
24  public:
49  SPIShiftRegisterOut(pin_t latchPin = SS, uint8_t bitOrder = MSBFIRST);
50 
56  void begin() override;
57 
61  void update() override;
62 };
63 
65 
66 #include "SPIShiftRegisterOut.ipp"
ShiftRegisterOutBase::bitOrder
const uint8_t bitOrder
Definition: ShiftRegisterOutBase.hpp:138
SPIShiftRegisterOut::update
void update() override
Write the state buffer to the physical outputs.
Definition: SPIShiftRegisterOut.ipp:21
SPIShiftRegisterOut
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
Definition: SPIShiftRegisterOut.hpp:23
pin_t
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
Definition: Def.hpp:17
SPIShiftRegisterOut.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
ShiftRegisterOutBase.hpp
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
SPIShiftRegisterOut::SPIShiftRegisterOut
SPIShiftRegisterOut(pin_t latchPin=SS, uint8_t bitOrder=MSBFIRST)
Create a new SPIShiftRegisterOut object with a given bit order, and a given number of outputs.
Definition: SPIShiftRegisterOut.ipp:10
SPIShiftRegisterOut::begin
void begin() override
Initialize the shift register.
Definition: SPIShiftRegisterOut.ipp:14