12 #ifndef CONFIG_CHECK_ESP32_H
13 #define CONFIG_CHECK_ESP32_H
81 #error This header should be included for ESP32 architecture, only
84 #include "disable_2pinmode_on_github_workflow.h"
85 #if !defined(MOZZI_AUDIO_MODE)
86 #define MOZZI_AUDIO_MODE MOZZI_OUTPUT_INTERNAL_DAC
88 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_PDM_VIA_I2S, MOZZI_OUTPUT_I2S_DAC, MOZZI_OUTPUT_INTERNAL_DAC)
90 #if !defined(MOZZI_AUDIO_RATE)
91 #define MOZZI_AUDIO_RATE 32768
94 #if defined(MOZZI_PWM_RATE)
95 #error Configuration of MOZZI_PWM_RATE is not currently supported on this platform (always same as MOZZI_AUDIO_RATE)
98 #if !defined(MOZZI_ANALOG_READ)
99 # define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_NONE
105 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_I2S_DAC, MOZZI_OUTPUT_PDM_VIA_I2S)
106 # if !defined(MOZZI_I2S_PIN_BCK)
107 # define MOZZI_I2S_PIN_BCK 26
109 # if !defined(MOZZI_I2S_PIN_WS)
110 # define MOZZI_I2S_PIN_WS 25
112 # if !defined(MOZZI_I2S_PIN_DATA)
113 # define MOZZI_I2S_PIN_DATA 33
117 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_INTERNAL_DAC, MOZZI_OUTPUT_I2S_DAC, MOZZI_OUTPUT_PDM_VIA_I2S)
118 # include <driver/i2s.h>
119 # if !defined(MOZZI_IS2_PORT)
120 # define MOZZI_I2S_PORT I2S_NUM_0
124 #if !defined(MOZZI_AUDIO_BITS)
125 # if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_INTERNAL_DAC)
126 # define MOZZI_AUDIO_BITS 8
128 # define MOZZI_AUDIO_BITS 16
132 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_PDM_VIA_I2S)
133 # if !defined(MOZZI_PDM_RESOLUTION)
134 # define MOZZI_PDM_RESOLUTION 8
137 # define MOZZI_PDM_RESOLUTION 1
141 #if !MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED)
142 # define BYPASS_MOZZI_OUTPUT_BUFFER true
145 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 12
#define MOZZI_AUDIO_INPUT
Whether to enable built in audio input feature.
#define MOZZI_AUDIO_MODE
Configure how Mozzi outputs generated sounds.
#define MOZZI_ANALOG_READ
Whether to compile in support for non-blocking analog reads.