Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
src
AH
Settings
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
10
11
#include <
AH/Types/Frequency.hpp
>
12
#include <
AH/Hardware/ADCConfig.hpp
>
13
#include <limits.h>
// CHAR_BIT
14
#include <stddef.h>
15
#include <stdint.h>
16
17
BEGIN_AH_NAMESPACE
18
19
// ----------------------------- Debug Settings ----------------------------- //
20
// ========================================================================== //
21
22
#ifndef DEBUG_OUT
27
#define DEBUG_OUT
28
// #define DEBUG_OUT Serial
29
#endif
30
32
#define FATAL_ERRORS
33
34
// ----------------------------- User Settings ------------------------------ //
35
// ========================================================================== //
36
38
constexpr
unsigned
long
defaultBaudRate
= 115200;
39
55
constexpr
uint8_t
ADC_BITS
=
ADC_RESOLUTION
;
56
66
constexpr
uint8_t
ANALOG_FILTER_SHIFT_FACTOR
= 2;
67
73
using
ANALOG_FILTER_TYPE
= uint16_t;
74
76
constexpr
unsigned
long
BUTTON_DEBOUNCE_TIME
= 25;
// milliseconds
77
81
constexpr
unsigned
long
SELECT_LINE_DELAY
= 10;
// microseconds
82
84
constexpr
unsigned
long
LONG_PRESS_DELAY
= 450;
// milliseconds
85
87
constexpr
unsigned
long
LONG_PRESS_REPEAT_DELAY
= 200;
// milliseconds
88
90
constexpr
unsigned
long
FILTERED_INPUT_UPDATE_INTERVAL
= 1000;
// microseconds
91
92
constexpr
static
Frequency
SPI_MAX_SPEED
= 8_MHz;
93
94
// ========================================================================== //
95
96
END_AH_NAMESPACE
ADCConfig.hpp
This file contains the platform-specific ADC resolutions.
ADC_RESOLUTION
#define ADC_RESOLUTION
The actual maximum resolution of the built-in ADC.
Definition
ADCConfig.hpp:76
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:14
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:11
Frequency.hpp
::Frequency
Type-safe class for frequency values.
Definition
Frequency.hpp:8
AH::SPI_MAX_SPEED
static constexpr Frequency SPI_MAX_SPEED
Definition
AH/Settings/Settings.hpp:92
AH::SELECT_LINE_DELAY
constexpr unsigned long SELECT_LINE_DELAY
The time in microseconds to wait for lines of multiplexers and scanning matrices to settle before rea...
Definition
AH/Settings/Settings.hpp:81
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:87
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:66
AH::BUTTON_DEBOUNCE_TIME
constexpr unsigned long BUTTON_DEBOUNCE_TIME
The debounce time for momentary push buttons in milliseconds.
Definition
AH/Settings/Settings.hpp:76
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:90
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:55
AH::defaultBaudRate
constexpr unsigned long defaultBaudRate
The default baud rate for debug output.
Definition
AH/Settings/Settings.hpp:38
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:73
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:84
Generated by
1.17.0