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"
24 if (pwm.isTimerStarted()) {
30 if (mode!=TX_MODE) LOGE(
"mode not supported: using TX_MODE");
31 return pwm.defaultConfig();
34 PWMConfig config() {
return audio_config; }
54 this->audio_config = config;
56 return pwm.begin(audio_config);
62 return pwm.begin(audio_config);
65 virtual void end()
override { pwm.end(); }
67 int availableForWrite()
override {
return pwm.availableForWrite(); }
71 size_t write(
const uint8_t *data,
size_t len)
override {
72 return pwm.write(data, len);
76 uint32_t underflowsPerSecond() {
return pwm.underflowsPerSecond(); }
78 uint32_t framesPerSecond() {
return pwm.framesPerSecond(); }
93 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