"Sound: ON/OFF" menu item (#19901)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Lucas Seiki Oshiro
2020-10-27 22:41:12 -03:00
committed by Scott Lahteine
parent d4669dbf6a
commit d7d1ef8228
13 changed files with 74 additions and 13 deletions

View File

@ -289,6 +289,7 @@ uint8_t MarlinUI::read_slow_buttons(void) {
// Duration in ms, freq in Hz
void MarlinUI::buzz(const long duration, const uint16_t freq) {
if (!PanelDetected) return;
if (!buzzer_enabled) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(BUZZER);