Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
AH/Settings/SettingsWrapper.hpp
Go to the documentation of this file.
1#ifndef AH_SETTINGSWRAPPER_HPP
2#define AH_SETTINGSWRAPPER_HPP
3
5
6// ---- User Settings ---- //
7// ======================= //
8#include "Settings.hpp"
9
10AH_DIAGNOSTIC_WERROR() // Enable errors on warnings
11
12#define AH_IS_EMPTY_HELPER(x) x##1
13#define AH_IS_EMPTY(x) AH_IS_EMPTY_HELPER(x) == 1
14
15#if AH_IS_EMPTY(DEBUG_OUT)
16#undef DEBUG_OUT
17#endif
18
19#ifndef ARDUINO
20#ifdef DEBUG_OUT
21#undef DEBUG_OUT
22#ifndef NO_DEBUG_PRINTS
23#define DEBUG_OUT std::cout
24#endif
25#endif
26#endif
27
28#ifdef TEENSYDUINO
30#if defined(DEBUG_OUT) && (DEBUG_OUT == Serial) && \
31 !defined(TEENSY_SERIALUSB_ENABLED)
32#error \
33 "Debugging is enabled on the CDC Serial port, but the USB type doesn't support Serial"
34#endif
35#endif
36
38static_assert(
39 sizeof(ANALOG_FILTER_TYPE) * CHAR_BIT >=
40 ADC_BITS + ANALOG_FILTER_SHIFT_FACTOR,
41 "ANALOG_FILTER_TYPE isn't wide enough to satisfy filter requirements. \n"
42 "Either decrease the ADC resolution, decrease the filter shift factor, or"
43 "use a wider type (e.g. uint32_t)");
45
47
48// ------- Debug ------- //
49// ===================== //
50#include <AH/Debug/Debug.hpp>
51
52#endif // AH_SETTINGSWRAPPER_HPP
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
All user settings and debugging options can be changed here.
#define AH_DIAGNOSTIC_POP()
Definition Warnings.hpp:50
#define AH_DIAGNOSTIC_WERROR()
Definition Warnings.hpp:49