12 #ifndef CONFIG_CHECK_TEENSY_H
13 #define CONFIG_CHECK_TEENSY_H
91 #if !(IS_TEENSY3() || IS_TEENSY4())
92 #error This header should be included for Teensy (3.x or 4.x) boards, only
98 # include "disable_2pinmode_on_github_workflow.h"
99 # if !defined(MOZZI_AUDIO_MODE)
100 # define MOZZI_AUDIO_MODE MOZZI_OUTPUT_INTERNAL_DAC
102 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_INTERNAL_DAC)
104 # include "disable_2pinmode_on_github_workflow.h"
105 # if !defined(MOZZI_AUDIO_MODE)
106 # define MOZZI_AUDIO_MODE MOZZI_OUTPUT_PWM
108 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_PWM)
111 #if !defined(MOZZI_AUDIO_RATE)
112 #define MOZZI_AUDIO_RATE 32768
115 #if defined(MOZZI_PWM_RATE)
116 #error Configuration of MOZZI_PWM_RATE is not currently supported on this platform (always same as MOZZI_AUDIO_RATE)
119 #if !defined(MOZZI_ANALOG_READ)
120 # define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_STANDARD
123 MOZZI_CHECK_SUPPORTED(
MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE, MOZZI_ANALOG_READ_STANDARD)
125 #include "teensyPinMap.h"
127 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_INTERNAL_DAC)
128 # define MOZZI_AUDIO_BITS 12
129 # if !defined(MOZZI_AUDIO_PIN_1)
130 # if defined(__MKL26Z64__)
131 # define MOZZI_AUDIO_PIN_1 A12
132 # elif defined(__MK20DX128__) || defined(__MK20DX256__)
133 # define MOZZI_AUDIO_PIN_1 A14
134 # elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
135 # define MOZZI_AUDIO_PIN_1 A21
137 # error DAC pin not know for this board. Please define MOZZI_AUDIO_PIN_1 as appropriate
140 # include "disable_stereo_on_github_workflow.h"
142 #elif MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_PWM)
143 # define MOZZI_AUDIO_BITS 10
144 # if !defined(MOZZI_AUDIO_PIN_1)
145 # define MOZZI_AUDIO_PIN_1 A8
147 # if !defined(MOZZI_AUDIO_PIN_2)
148 # define MOZZI_AUDIO_PIN_2 A9
153 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 10
#define MOZZI_AUDIO_CHANNELS
This sets allows to change from a single/mono audio output channel to stereo output.
#define MOZZI_AUDIO_MODE
Configure how Mozzi outputs generated sounds.
#define MOZZI_ANALOG_READ
Whether to compile in support for non-blocking analog reads.