MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
8 #include <AH/Hardware/ExtendedInputOutput/ExtendedInputOutput.hpp>
33 static constexpr uint8_t DECODEMODE = 9;
34 static constexpr uint8_t INTENSITY = 10;
35 static constexpr uint8_t SCANLIMIT = 11;
36 static constexpr uint8_t SHUTDOWN = 12;
37 static constexpr uint8_t DISPLAYTEST = 15;
47 sendRaw(DISPLAYTEST, 0);
48 sendRaw(SCANLIMIT, 7);
49 sendRaw(DECODEMODE, 0);
50 sendRaw(INTENSITY, 0xF);
59 for (uint8_t j = 1; j < 8 + 1; j++)
71 void send(uint8_t digit, uint8_t value) {
72 sendRaw((digit & 0x7) + 1, value);
83 void sendRaw(uint8_t opcode, uint8_t value) {
85 SPI.beginTransaction(settings);
99 sendRaw(INTENSITY, intensity & 0xF);
void pinMode(pin_t pin, uint8_t mode)
An ExtIO version of the Arduino function.
A base class for classes that control MAX7219 LED drivers.
constexpr static Frequency SPI_MAX_SPEED
void send(uint8_t digit, uint8_t value)
Send the value to the given digit.
void setIntensity(uint8_t intensity)
Set the intensity of the LEDs.
void clear()
Turn off all LEDs.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
#define AH_DIAGNOSTIC_POP()
MAX7219_Base(pin_t loadPin)
Create a MAX7219_Base object.
void sendRaw(uint8_t opcode, uint8_t value)
Send a raw opcode and value to the MAX7219.
#define AH_DIAGNOSTIC_EXTERNAL_HEADER()
#define AH_DIAGNOSTIC_WERROR()
#define BEGIN_AH_NAMESPACE
void digitalWrite(pin_t pin, uint8_t val)
An ExtIO version of the Arduino function.
void init()
Initialize the Arduino pins, SPI, and the MAX7219.