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
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 11
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
98 #if MOZZI_IS(MOZZI_AUDIO_MODE, MOZZI_OUTPUT_I2S_DAC)
99 # if !defined(MOZZI_AUDIO_BITS)
100 # define MOZZI_AUDIO_BITS 16
102 # if !defined(MOZZI_I2S_PIN_BCK)
103 # define MOZZI_I2S_PIN_BCK 20
106 # if !defined(MOZZI_I2S_PIN_DATA)
107 # define MOZZI_I2S_PIN_DATA 22
109 # if !defined(MOZZI_I2S_FORMAT)
110 # define MOZZI_I2S_FORMAT MOZZI_I2S_FORMAT_PLAIN
112 MOZZI_CHECK_SUPPORTED(MOZZI_I2S_FORMAT, MOZZI_I2S_FORMAT_PLAIN, MOZZI_I2S_FORMAT_LSBJ)
113 # define BYPASS_MOZZI_OUTPUT_BUFFER true
114 # define MOZZI_RP2040_BUFFERS 8
115 # define MOZZI_RP2040_BUFFER_SIZE 256
118 #if !defined(MOZZI_ANALOG_READ)
119 # define MOZZI_ANALOG_READ MOZZI_ANALOG_READ_STANDARD
122 #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 12
124 MOZZI_CHECK_SUPPORTED(
MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE, MOZZI_ANALOG_READ_STANDARD)
125 MOZZI_CHECK_SUPPORTED(MOZZI_AUDIO_INPUT, MOZZI_AUDIO_INPUT_NONE, MOZZI_ANALOG_READ_STANDARD)