Add touch buttons for speaker toggle and music playback.
Enable SoftSPI touch, replace auto beeps with Speaker ON/OFF and Play Music controls, and document usage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,8 +3,17 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
void audio_init();
|
||||
// 短测:三声蜂鸣(开机 / 周期测试)
|
||||
void audio_play_beep_sequence();
|
||||
// 简短旋律(约 1.5s)
|
||||
void audio_play_melody();
|
||||
|
||||
// 扬声器总开关(关则静音并停止播放)
|
||||
void audio_set_enabled(bool on);
|
||||
bool audio_is_enabled();
|
||||
|
||||
// 开始/停止内置音乐(非阻塞,在 audio_tick 推进)
|
||||
void audio_play_music();
|
||||
void audio_stop();
|
||||
bool audio_is_playing();
|
||||
|
||||
// 主循环调用
|
||||
void audio_tick();
|
||||
|
||||
const char *audio_last_status();
|
||||
|
||||
Reference in New Issue
Block a user