pref: 改进按键体验

This commit is contained in:
bmy
2024-02-10 16:19:51 +08:00
parent 27c50ceea8
commit 85fe5a27df
4 changed files with 61 additions and 39 deletions

View File

@@ -51,3 +51,13 @@ void by_buzzer_add(uint16_t tone)
{
queue_add_element(tone);
}
void by_buzzer_run(void)
{
if (queue_long != 0) {
pwm_init(BUZZER_PIN, a[0], 5000);
queue_pop_element();
system_delay_ms(100);
pwm_set_duty(BUZZER_PIN, 0);
}
}