Control Surface  1.1.1
MIDI Control Surface library for Arduino
AH/Settings/Settings.hpp
Go to the documentation of this file.
1 #ifndef AH_SETTINGSWRAPPER_HPP
2 #error "Do not include this file directly, use the wrapper!"
3 #endif
4 
11 #include <AH/Types/Frequency.hpp>
13 #include <limits.h> // CHAR_BIT
14 #include <stddef.h>
15 #include <stdint.h>
16 
18 
19 // ----------------------------- Debug Settings ----------------------------- //
20 // ========================================================================== //
21 
26 #define DEBUG_OUT
27 // #define DEBUG_OUT Serial
28 
30 #define FATAL_ERRORS
31 
32 // ----------------------------- User Settings ------------------------------ //
33 // ========================================================================== //
34 
36 constexpr unsigned long defaultBaudRate = 115200;
37 
53 constexpr uint8_t ADC_BITS = ADC_RESOLUTION;
54 
64 constexpr uint8_t ANALOG_FILTER_SHIFT_FACTOR = 2;
65 
71 using ANALOG_FILTER_TYPE = uint16_t;
72 
74 constexpr unsigned long BUTTON_DEBOUNCE_TIME = 25; // milliseconds
75 
77 constexpr unsigned long LONG_PRESS_DELAY = 450; // milliseconds
78 
80 constexpr unsigned long LONG_PRESS_REPEAT_DELAY = 200; // milliseconds
81 
83 constexpr unsigned long FILTERED_INPUT_UPDATE_INTERVAL = 1000; // microseconds
84 
85 constexpr static Frequency SPI_MAX_SPEED = 8_MHz;
86 
89 #define AH_INDIVIDUAL_BUTTON_INVERT
90 
91 // ========================================================================== //
92 
AH::SPI_MAX_SPEED
constexpr static Frequency SPI_MAX_SPEED
Definition: AH/Settings/Settings.hpp:85
ADC_RESOLUTION
#define ADC_RESOLUTION
The actual maximum resolution of the built-in ADC.
Definition: ADCConfig.hpp:69
AH::ANALOG_FILTER_SHIFT_FACTOR
constexpr uint8_t ANALOG_FILTER_SHIFT_FACTOR
The factor for the analog filter: Difference equation: where .
Definition: AH/Settings/Settings.hpp:64
AH::ADC_BITS
constexpr uint8_t ADC_BITS
The bit depth to use for the ADC (Analog to Digital Converter).
Definition: AH/Settings/Settings.hpp:53
AH::LONG_PRESS_REPEAT_DELAY
constexpr unsigned long LONG_PRESS_REPEAT_DELAY
The time between increments/decremnets during a long press.
Definition: AH/Settings/Settings.hpp:80
AH::defaultBaudRate
constexpr unsigned long defaultBaudRate
The default baud rate for debug output.
Definition: AH/Settings/Settings.hpp:36
AH::BUTTON_DEBOUNCE_TIME
constexpr unsigned long BUTTON_DEBOUNCE_TIME
The debounce time for momentary push buttons in milliseconds.
Definition: AH/Settings/Settings.hpp:74
Frequency.hpp
AH::ANALOG_FILTER_TYPE
uint16_t ANALOG_FILTER_TYPE
The unsigned integer type to use for analog inputs during filtering.
Definition: AH/Settings/Settings.hpp:71
AH::LONG_PRESS_DELAY
constexpr unsigned long LONG_PRESS_DELAY
The time in milliseconds before a press is registered as a long press.
Definition: AH/Settings/Settings.hpp:77
AH::Frequency
Type-safe class for frequency values.
Definition: Frequency.hpp:11
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition: AH/Settings/NamespaceSettings.hpp:9
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition: AH/Settings/NamespaceSettings.hpp:10
ADCConfig.hpp
This file contains the platform-specific ADC resolutions. By default, the library automatically selec...
AH::FILTERED_INPUT_UPDATE_INTERVAL
constexpr unsigned long FILTERED_INPUT_UPDATE_INTERVAL
The interval between updating filtered analog inputs, in microseconds.
Definition: AH/Settings/Settings.hpp:83