12 #ifndef CONFIG_CHECK_RP2040_H
13 #define CONFIG_CHECK_RP2040_H
73 #error This header should be included for RP2040 architecture (Raspberry Pi Pico and others), only
76 #include "disable_2pinmode_on_github_workflow.h"
77 #if !defined(MOZZI_AUDIO_MODE)
78 # define MOZZI_AUDIO_MODE MOZZI_OUTPUT_PWM
80 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_PWM, MOZZI_OUTPUT_I2S_DAC)
82 #if !defined(MOZZI_AUDIO_RATE)
83 #define MOZZI_AUDIO_RATE 32768
86 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_PWM)
87 # if !defined(MOZZI_AUDIO_BITS)
88 # define MOZZI_AUDIO_BITS 16
90 # if !defined(MOZZI_AUDIO_PIN_1)
91 # define MOZZI_AUDIO_PIN_1 0
93 # if !defined(MOZZI_AUDIO_PIN_2)
94 # define MOZZI_AUDIO_PIN_2 1
96 # define BYPASS_MOZZI_OUTPUT_BUFFER true
97 # define MOZZI_RP2040_BUFFERS 8
98 # define MOZZI_RP2040_BUFFER_SIZE 256
101 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_I2S_DAC)
102 # if !defined(MOZZI_AUDIO_BITS)
103 # define MOZZI_AUDIO_BITS 16
105 # if !defined(MOZZI_I2S_PIN_BCK)
106 # define MOZZI_I2S_PIN_BCK 20
109 # if !defined(MOZZI_I2S_PIN_DATA)
110 # define MOZZI_I2S_PIN_DATA 22
112 # if !defined(MOZZI_I2S_FORMAT)
113 # define MOZZI_I2S_FORMAT MOZZI_I2S_FORMAT_PLAIN
115 MOZZI_CHECK_SUPPORTED(MOZZI_I2S_FORMAT, MOZZI_I2S_FORMAT_PLAIN, MOZZI_I2S_FORMAT_LSBJ)
116 # define BYPASS_MOZZI_OUTPUT_BUFFER true
117 # define MOZZI_RP2040_BUFFERS 8
118 # define MOZZI_RP2040_BUFFER_SIZE 256
121 #if !defined(MOZZI_ANALOG_READ)
122 # define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_STANDARD
125 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 12
127 MOZZI_CHECK_SUPPORTED(
MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE, MOZZI_ANALOG_READ_STANDARD)
128 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_INPUT, MOZZI_AUDIO_INPUT_NONE, MOZZI_ANALOG_READ_STANDARD)
#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.