12 #ifndef CONFIG_CHECKS_STM32DUINO_H
13 #define CONFIG_CHECKS_STM32DUINO_H
94 #if not IS_STM32DUINO()
95 #error This header should be included for STM32 (stm32duino.com core), only
98 #if !defined(MOZZI_AUDIO_MODE)
99 # define MOZZI_AUDIO_MODE MOZZI_OUTPUT_PWM
101 MOZZI_CHECK_SUPPORTED(
MOZZI_AUDIO_MODE, MOZZI_OUTPUT_EXTERNAL_TIMED, MOZZI_OUTPUT_EXTERNAL_CUSTOM, MOZZI_OUTPUT_PWM, MOZZI_OUTPUT_2PIN_PWM)
103 #if !defined(MOZZI_AUDIO_RATE)
104 # define MOZZI_AUDIO_RATE 32768
107 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_PWM, MOZZI_OUTPUT_2PIN_PWM, MOZZI_OUTPUT_EXTERNAL_TIMED)
108 # if !defined(MOZZI_AUDIO_UPDATE_TIMER)
109 # define MOZZI_AUDIO_UPDATE_TIMER TIM2
113 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_PWM)
114 # if !defined(MOZZI_AUDIO_PIN_1)
115 # define MOZZI_AUDIO_PIN_1 PA8
117 # if (MOZZI_AUDIO_CHANNELS > 1) && !defined(MOZZI_AUDIO_PIN_1)
118 # define MOZZI_AUDIO_PIN_2 PA9
120 # if !defined(MOZZI_AUDIO_BITS)
121 # define MOZZI_AUDIO_BITS 10
123 # define MOZZI_AUDIO_BITS_PER_CHANNEL MOZZI_AUDIO_BITS
124 #elif MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_2PIN_PWM)
125 # if !defined(MOZZI_AUDIO_PIN_1)
126 # define MOZZI_AUDIO_PIN_1 PA8
128 # if !defined(MOZZI_AUDIO_PIN_1_LOW)
129 # define MOZZI_AUDIO_PIN_1_LOW PA9
131 # include "disable_stereo_on_github_workflow.h"
133 # if !defined(MOZZI_AUDIO_PER_CHANNEL)
134 # define MOZZI_AUDIO_BITS_PER_CHANNEL 7
136 # define MOZZI_AUDIO_BITS (MOZZI_AUDIO_BITS_PER_CHANNEL * 2)
139 #if !defined(MOZZI_ANALOG_READ)
140 #define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_STANDARD
143 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION ADC_RESOLUTION
#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.