This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
SettingsWrapper.hpp
Go to the documentation of this file.
1 #ifndef SETTINGSWRAPPER_HPP
2 #define SETTINGSWRAPPER_HPP
3 
4 // ---- User Settings ---- //
5 // ======================= //
6 #include "NamespaceSettings.hpp"
7 #include "Settings.hpp"
8 
9 #ifndef ARDUINO
10 #undef IGNORE_SYSEX
11 #define IGNORE_SYSEX 0
12 #define MIDI_NUM_CABLES 16
13 #ifdef DEBUG_OUT
14 #undef DEBUG_OUT
15 #endif
16 #ifndef NO_DEBUG_PRINTS
17 #define DEBUG_OUT std::cout
18 #endif
19 #endif
20 
21 #ifdef INDIVIDUAL_BUTTON_INVERT
22 #define INDIVIDUAL_BUTTON_INVERT_STATIC
23 #else
24 #define INDIVIDUAL_BUTTON_INVERT_STATIC static
25 #endif
26 
27 #ifdef TEENSYDUINO
29 #if defined(DEBUG_OUT) && (DEBUG_OUT == Serial) && \
30  !defined(TEENSY_SERIALUSB_ENABLED)
31 #error \
32  "Debugging is enabled on the CDC Serial port, but the USB type doesn't support Serial"
33 #endif
34 #endif
35 
37 static_assert(
38  sizeof(ANALOG_FILTER_TYPE) * CHAR_BIT >=
40  "ANALOG_FILTER_TYPE isn't wide enough to satisfy filter requirements. \n"
41  "Either decrease the ADC resolution, decrease the filter shift factor, or"
42  "use a wider type (e.g. uint32_t)");
44 
45 // ------- Debug ------- //
46 // ===================== //
47 #include <Helpers/Debug.hpp>
48 
49 #endif // SETTINGSWRAPPER_HPP
ANALOG_FILTER_TYPE
uint16_t ANALOG_FILTER_TYPE
The unsigned integer type to use for analog inputs during filtering.
Definition: Settings.hpp:69
ADC_BITS
constexpr uint8_t ADC_BITS
The bit depth to use for the ADC (Analog to Digital Converter).
Definition: Settings.hpp:51
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
TeensyUSBTypes.hpp
ANALOG_FILTER_SHIFT_FACTOR
constexpr uint8_t ANALOG_FILTER_SHIFT_FACTOR
The factor for the analog filter: Difference equation: where .
Definition: Settings.hpp:62
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
NamespaceSettings.hpp
Debug.hpp
Settings.hpp
All user settings and debugging options can be changed here.