BUZZ cleanup (#14760)

This commit is contained in:
Ludy authored and Scott Lahteine committed 2019-07-28 19:14:50 -05:00
1 parent 6b02b89ab4
commit c4bb458763
12 files changed
+74 -34

No files matched your search

+17 -11
View File
@@ -258,15 +258,15 @@ public:
#endif
}
static inline void buzz(const long duration, const uint16_t freq) {
#if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(duration, freq);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(duration, freq);
#else
UNUSED(duration); UNUSED(freq);
#endif
}
#if HAS_BUZZER
static inline void buzz(const long duration, const uint16_t freq) {
#if ENABLED(LCD_USE_I2C_BUZZER)
lcd.buzz(duration, freq);
#elif PIN_EXISTS(BEEPER)
buzzer.tone(duration, freq);
#endif
}
#endif
// LCD implementations
static void clear_lcd();
@@ -355,7 +355,9 @@ public:
#endif
static void quick_feedback(const bool clear_buttons=true);
static void completion_feedback(const bool good=true);
#if HAS_BUZZER
static void completion_feedback(const bool good=true);
#endif
#if DISABLED(LIGHTWEIGHT_UI)
static void draw_status_message(const bool blink);
@@ -466,7 +468,11 @@ public:
#endif
#if ENABLED(G26_MESH_VALIDATION)
static inline void chirp() { buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); }
static inline void chirp() {
#if HAS_BUZZER
buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#endif
}
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)