#pragma once #include "stdint.h" #include "i2s.h" class AudioOutputPWM{ // Singleton Adapter public: AudioOutputPWM(unsigned rate=44100) {i2s_begin();SetRate(rate);} ~AudioOutputPWM() {i2s_end();} static void SetRate(unsigned hz) {i2s_set_rate(hz);} static void ConsumeSample(uint8_t sa) {i2s_write_sample_b(sa);} };
Vorgefundene Kodierung: ASCII (7 bit) | 2 |