Control Surface
main
MIDI Control Surface library for Arduino
Toggle main menu visibility
Main Page
User Manual
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Typedefs
a
b
c
k
m
n
p
t
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
i
l
m
p
r
s
t
v
w
Enumerations
Enumerator
a
b
d
f
h
i
l
m
n
o
p
r
s
v
w
Related Symbols
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
g
i
l
m
o
p
s
u
v
Variables
c
e
f
h
i
l
m
n
o
p
s
u
v
Typedefs
a
b
c
e
f
i
k
m
n
p
s
t
u
v
Enumerations
Enumerator
Macros
a
b
c
d
e
f
h
i
n
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
src
AH
Hardware
ADCConfig.hpp
Go to the documentation of this file.
1
#pragma once
2
16
#include <
AH/Arduino-Wrapper.h
>
17
18
#if defined(ADC_RESOLUTION)
19
#define HAS_ANALOG_READ_RESOLUTION 1
20
21
// Teensy
22
//------------------------------------------------------------------------------
23
#elif defined(TEENSYDUINO) && !defined(DOXYGEN)
24
25
#if defined(__AVR__)
// Teensy 2.x
26
#define ADC_RESOLUTION 10
27
#define HAS_ANALOG_READ_RESOLUTION 0
28
29
#elif defined(__MK20DX128__)
// Teensy 3.0
30
#define ADC_RESOLUTION 13
31
#define HAS_ANALOG_READ_RESOLUTION 1
32
33
#elif defined(__MK20DX256__)
// Teensy 3.1/3.2
34
#define ADC_RESOLUTION 13
35
#define HAS_ANALOG_READ_RESOLUTION 1
36
37
#elif defined(__MKL26Z64__)
// Teensy LC
38
#define ADC_RESOLUTION 12
39
#define HAS_ANALOG_READ_RESOLUTION 1
40
41
#elif defined(__MK64FX512__)
// Teensy 3.5
42
#define ADC_RESOLUTION 13
43
#define HAS_ANALOG_READ_RESOLUTION 1
44
45
#elif defined(__MK66FX1M0__)
// Teensy 3.6
46
#define ADC_RESOLUTION 13
47
#define HAS_ANALOG_READ_RESOLUTION 1
48
49
#elif defined(__IMXRT1062__) || defined(__IMXRT1052__)
// Teensy 4.0
50
#define ADC_RESOLUTION 12
51
#define HAS_ANALOG_READ_RESOLUTION 1
52
53
#else
54
#warning "Unknown Teensy board, please open an issue on GitHub" \
55
"https://github.com/tttapa/Arduino-Helpers"
56
#endif
57
58
// ESP32
59
//------------------------------------------------------------------------------
60
#elif defined(ESP32)
61
62
#define ADC_RESOLUTION 12
63
#define HAS_ANALOG_READ_RESOLUTION 1
64
65
// Unit test on PC
66
// -----------------------------------------------------------------------------
67
#elif !defined(ARDUINO)
68
69
#define ADC_RESOLUTION 10
70
#define HAS_ANALOG_READ_RESOLUTION 1
71
72
// Unknown/Default
73
//------------------------------------------------------------------------------
74
#else
76
#define ADC_RESOLUTION 10
78
#define HAS_ANALOG_READ_RESOLUTION 0
79
80
#endif
Arduino-Wrapper.h
Generated by
1.10.0