Add lcd_buzz function to ultralcd.h so that non-LCD code can make use of lcd's buzzer.

Argument order of lcd_buzz was set to mirror that on tone(). Change
default M300 frequency to something audible.
This commit is contained in:
Robert F-C
2013-04-29 21:50:52 +10:00
parent 788d62bcc4
commit 7f57f28ccc
3 changed files with 23 additions and 7 deletions

View File

@@ -946,6 +946,13 @@ void lcd_buttons_update()
lastEncoderBits = enc;
}
void lcd_buzz(long duration, uint16_t freq)
{
#ifdef LCD_USE_I2C_BUZZER
lcd.buzz(duration,freq);
#endif
}
bool lcd_clicked()
{
return LCD_CLICKED;