Overridable Options - Part 5

Apply `ENABLED` / `DISABLED` macros to files needing only a small
number of changes.
This commit is contained in:
Scott Lahteine
2015-07-30 22:21:18 -07:00
committed by Richard Wackerbarth
parent 5e834352a9
commit 58cfcd4239
33 changed files with 63 additions and 62 deletions

View File

@@ -5,9 +5,9 @@
#if HAS_BUZZER
void buzz(long duration, uint16_t freq) {
if (freq > 0) {
#ifdef LCD_USE_I2C_BUZZER
#if ENABLED(LCD_USE_I2C_BUZZER)
lcd_buzz(duration, freq);
#elif defined(BEEPER) && BEEPER >= 0 // on-board buzzers have no further condition
#elif HAS_BUZZER // on-board buzzers have no further condition
SET_OUTPUT(BEEPER);
#ifdef SPEAKER // a speaker needs a AC ore a pulsed DC
//tone(BEEPER, freq, duration); // needs a PWMable pin