Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Def.hpp
Go to the documentation of this file.
1/* ✔ */
2
3#pragma once
4
5#include "Cable.hpp"
6#include "Channel.hpp"
9#include <AH/STL/limits>
10#include <Settings/NamespaceSettings.hpp>
11#include <stddef.h> // size_t
12#include <stdint.h> // uint8_t
13
15
16using AH::analog_t;
17using AH::NO_PIN;
18using AH::pin_t;
19using AH::PinList;
20
21using MappingFunction = analog_t (*)(analog_t);
22
23using AH::Array;
24using AH::Array2D;
25
27template <uint8_t NumRows, uint8_t NumCols>
29
43
49
54 (std::numeric_limits<setting_t>::max() >> 1) + 1;
55
56// Updatable types:
57struct Potentiometer {};
58struct MotorFader {};
59struct Display {};
60
66
constexpr setting_t NoSetting
A special setting that indicates an unused or invalid setting.
Definition Def.hpp:53
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
constexpr pin_t NO_PIN
A special pin number that indicates an unused or invalid pin.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
An array wrapper for easy copying, comparing, and iterating.
Definition Array.hpp:32
A struct for the pins of a rotary (quadrature) encoder without a switch.
Definition Def.hpp:45
uint8_t B
The pin connected to the B pin of the encoder.
Definition Def.hpp:47
uint8_t A
The pin connected to the A pin of the encoder.
Definition Def.hpp:46
A struct for the pins of a rotary (quadrature) encoder with a switch.
Definition Def.hpp:31
pin_t switchPin
The pin connected to the switch pin of the encoder.
Definition Def.hpp:41
uint8_t B
The pin connected to the B pin of the encoder.
Definition Def.hpp:40
uint8_t A
The pin connected to the A pin of the encoder.
Definition Def.hpp:39
EncoderSwitchPinList(uint8_t A, uint8_t B)
Constructor for encoders without a switch.
Definition Def.hpp:36
EncoderSwitchPinList(uint8_t A, uint8_t B, pin_t switchPin)
Constructor for encoders with a switch.
Definition Def.hpp:33
A simple struct representing a pixel with integer coordinates.
Definition Def.hpp:62
int16_t x
Definition Def.hpp:63
int16_t y
Definition Def.hpp:64