Speaker option for the H1

This commit is contained in:
eried 2020-06-08 01:23:44 +02:00
parent bf3f9cfe75
commit 934f4b07c4
4 changed files with 56 additions and 1 deletions

View file

@ -93,6 +93,15 @@ bool get_antenna_bias() {
return antenna_bias;
}
bool speaker_mode { false };
void set_speaker_mode(const bool v) {
speaker_mode = v;
if (speaker_mode)
audio::output::speaker_unmute();
else
audio::output::speaker_mute();
}
static constexpr uint32_t systick_count(const uint32_t clock_source_f) {
return clock_source_f / CH_FREQUENCY;
}