2 #include "AudioConfig.h"
5 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioESP32.h"
6 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioMBED.h"
7 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioRP2040.h"
8 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioRenesas.h"
9 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioSTM32.h"
11 #include "AudioTools/CoreAudio/AudioPWM/PWMAudioAVR.h"
25 if (pwm.isTimerStarted()) {
31 if (mode!=TX_MODE) LOGE(
"mode not supported: using TX_MODE");
32 return pwm.defaultConfig();
35 PWMConfig config() {
return audio_config; }
40 AudioOutput::cfg = info;
62 this->audio_config = config;
69 return pwm.begin(audio_config);
72 virtual void end()
override { pwm.end(); }
74 int availableForWrite()
override {
return pwm.availableForWrite(); }
78 size_t write(
const uint8_t *data,
size_t len)
override {
79 return pwm.write(data, len);
83 uint32_t underflowsPerSecond() {
return pwm.underflowsPerSecond(); }
85 uint32_t framesPerSecond() {
return pwm.framesPerSecond(); }
100 using PWMAudioStream = PWMAudioOutput;
RxTxMode
The Microcontroller is the Audio Source (TX_MODE) or Audio Sink (RX_MODE). RXTX_MODE is Source and Si...
Definition: AudioTypes.h:28