Add configurable beep for UltiPanel.
This commit is contained in:
parent
d16a770855
commit
46f5bea19f
@ -718,6 +718,7 @@ static void lcd_implementation_quick_feedback()
|
|||||||
#endif
|
#endif
|
||||||
#elif defined(BEEPER) && BEEPER > -1
|
#elif defined(BEEPER) && BEEPER > -1
|
||||||
SET_OUTPUT(BEEPER);
|
SET_OUTPUT(BEEPER);
|
||||||
|
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
|
||||||
for(int8_t i=0;i<10;i++)
|
for(int8_t i=0;i<10;i++)
|
||||||
{
|
{
|
||||||
WRITE(BEEPER,HIGH);
|
WRITE(BEEPER,HIGH);
|
||||||
@ -725,6 +726,15 @@ static void lcd_implementation_quick_feedback()
|
|||||||
WRITE(BEEPER,LOW);
|
WRITE(BEEPER,LOW);
|
||||||
delayMicroseconds(100);
|
delayMicroseconds(100);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
for(int8_t i=0;i<(LCD_FEEDBACK_FREQUENCY_DURATION_MS / (1000 / LCD_FEEDBACK_FREQUENCY_HZ));i++)
|
||||||
|
{
|
||||||
|
WRITE(BEEPER,HIGH);
|
||||||
|
delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
|
||||||
|
WRITE(BEEPER,LOW);
|
||||||
|
delayMicroseconds(1000000 / LCD_FEEDBACK_FREQUENCY_HZ / 2);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user