pref: 修改buzzer接口

This commit is contained in:
bmy
2024-02-07 14:12:00 +08:00
parent 5f29a9eca2
commit 04973e875c
3 changed files with 13 additions and 22 deletions

View File

@@ -54,3 +54,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);
}
}