Rework buzzing (PR#2296)

by:
Moving HAS_LCD_BUZZ macro to Coditionals.h
Renaming HAS_LCD_BUZZ to HAS_BUZZER to make clear is has nothing to do with the lcd.
Removing the ULTRALCD condition.

Moving declaration of lcd_buzz() out of the ULTRA_LCD block in ultralcd.h
Moving definition of lcd_buzz() out of the ULTIPANEL block in ultralcd.cpp
Renaming lcd_buzz() to buzz() to make clear is has nothing to do with the lcd.

All buzzing code is now only dependent on the existence of a BEEPER-pin or the definition of a LCD_USE_I2C_BUZZER.

To do: Check the conditions for the BEEPER-pin in all pin-files.
This commit is contained in:
AnHardt
2015-06-15 00:12:02 +02:00
committed by Richard Wackerbarth
parent 29122db2fa
commit 6ab7b560af
4 changed files with 22 additions and 18 deletions

View File

@@ -504,5 +504,7 @@
#define WRITE_FAN(v) WRITE(FAN_PIN, v)
#endif
#define HAS_BUZZER ((defined(BEEPER) && BEEPER >= 0) || defined(LCD_USE_I2C_BUZZER))
#endif //CONFIGURATION_LCD
#endif //CONDITIONALS_H