Control Surface stm32
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
13#include <limits.h> // CHAR_BIT
14#include <stddef.h>
15#include <stdint.h>
16
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
38constexpr unsigned long defaultBaudRate = 115200;
39
55constexpr uint8_t ADC_BITS = ADC_RESOLUTION;
56
66constexpr uint8_t ANALOG_FILTER_SHIFT_FACTOR = 2;
67
73using ANALOG_FILTER_TYPE = uint16_t;
74
76constexpr unsigned long BUTTON_DEBOUNCE_TIME = 25; // milliseconds
77
79constexpr unsigned long LONG_PRESS_DELAY = 450; // milliseconds
80
82constexpr unsigned long LONG_PRESS_REPEAT_DELAY = 200; // milliseconds
83
85constexpr unsigned long FILTERED_INPUT_UPDATE_INTERVAL = 1000; // microseconds
86
87constexpr static Frequency SPI_MAX_SPEED = 8_MHz;
88
89// ========================================================================== //
90
This file contains the platform-specific ADC resolutions.
#define ADC_RESOLUTION
The actual maximum resolution of the built-in ADC.
Definition: ADCConfig.hpp:76
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Type-safe class for frequency values.
Definition: Frequency.hpp:11
static constexpr Frequency SPI_MAX_SPEED
constexpr unsigned long LONG_PRESS_REPEAT_DELAY
The time between increments/decremnets during a long press.
constexpr uint8_t ANALOG_FILTER_SHIFT_FACTOR
The factor for the analog filter: Difference equation: where .
constexpr unsigned long BUTTON_DEBOUNCE_TIME
The debounce time for momentary push buttons in milliseconds.
constexpr unsigned long FILTERED_INPUT_UPDATE_INTERVAL
The interval between updating filtered analog inputs, in microseconds.
constexpr uint8_t ADC_BITS
The bit depth to use for the ADC (Analog to Digital Converter).
constexpr unsigned long defaultBaudRate
The default baud rate for debug output.
uint16_t ANALOG_FILTER_TYPE
The unsigned integer type to use for analog inputs during filtering.
constexpr unsigned long LONG_PRESS_DELAY
The time in milliseconds before a press is registered as a long press.