mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
buzzer: disable when quiet
This commit is contained in:
parent
58f4db1f19
commit
1c7c5ecb2b
1 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ void genericBuzzer::shutdown() {
|
|||
|
||||
void genericBuzzer::quiet(bool buzzer_state) {
|
||||
_is_quiet = buzzer_state;
|
||||
#ifdef PIN_BUZZER_EN
|
||||
if (_is_quiet) {
|
||||
digitalWrite(PIN_BUZZER_EN, LOW);
|
||||
} else {
|
||||
digitalWrite(PIN_BUZZER_EN, HIGH);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool genericBuzzer::isQuiet() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue