Mute and unmute audio

This commit is contained in:
eried 2020-06-08 01:22:58 +02:00
parent 2d765f8120
commit 3c304b9fe3
3 changed files with 29 additions and 0 deletions

View file

@ -26,6 +26,7 @@
using portapack::clock_manager;
#include "portapack_hal.hpp"
#include "portapack_persistent_memory.hpp"
#include "i2s.hpp"
using namespace lpc43xx;
@ -153,6 +154,16 @@ void unmute() {
audio_codec->headphone_enable();
}
void speaker_mute() {
i2s::i2s0::tx_mute();
audio_codec->speaker_disable();
}
void speaker_unmute() {
i2s::i2s0::tx_unmute();
audio_codec->speaker_enable();
}
} /* namespace output */
namespace input {