Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
SPIShiftRegisterOut.hpp
Go to the documentation of this file.
1/* ✔ */
2
3#pragma once
4
6
7#include <AH/Arduino-Wrapper.h> // MSBFIRST, SS
9#include <SPI.h>
11
13
27template <uint16_t N, class SPIDriver = decltype(SPI) &>
29 public:
57 BitOrder_t bitOrder = MSBFIRST);
58
64 void begin() override;
65
69 void updateBufferedOutputs() override;
70
71 private:
73
74 public:
75 SPISettings settings{SPI_MAX_SPEED, this->bitOrder, SPI_MODE0};
76};
77
79
80#include "SPIShiftRegisterOut.ipp"
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
uint8_t BitOrder_t
#define AH_DIAGNOSTIC_EXTERNAL_HEADER()
Definition Warnings.hpp:51
#define AH_DIAGNOSTIC_POP()
Definition Warnings.hpp:50
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
void updateBufferedOutputs() override
Write the state buffer to the physical outputs.
void begin() override
Initialize the shift register.
SPIShiftRegisterOut(SPIDriver spi, pin_t latchPin=SS, BitOrder_t bitOrder=MSBFIRST)
Create a new SPIShiftRegisterOut object with a given bit order, and a given number of outputs.
A class for serial-in/parallel-out shift registers, like the 74HC595.
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32