Add GPIO26 speaker beep and melody test.
Play audio on boot and every 12s via the onboard amp; show status on the LVGL UI and document pins. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
10
include/audio_test.h
Normal file
10
include/audio_test.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
void audio_init();
|
||||
// 短测:三声蜂鸣(开机 / 周期测试)
|
||||
void audio_play_beep_sequence();
|
||||
// 简短旋律(约 1.5s)
|
||||
void audio_play_melody();
|
||||
const char *audio_last_status();
|
||||
@@ -11,5 +11,8 @@
|
||||
#define SD_SCK 18
|
||||
#define SD_CS 5
|
||||
|
||||
// 板载 SC8002B 功放 → P4 喇叭座(DAC2)
|
||||
#define SPEAKER_PIN 26
|
||||
|
||||
#define SCREEN_WIDTH 240
|
||||
#define SCREEN_HEIGHT 320
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
void ui_create();
|
||||
void ui_update(const SdCardInfo &info);
|
||||
void ui_set_audio_status(const char *text);
|
||||
|
||||
Reference in New Issue
Block a user