Strip TF and audio; keep touch-only screen test UI.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
void audio_init();
|
||||
|
||||
// 扬声器总开关(关则静音并停止播放)
|
||||
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();
|
||||
@@ -1,27 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
// CYD ESP32-2432S028R 引脚
|
||||
// CYD ESP32-2432S028R — 仅屏幕 + 触摸
|
||||
|
||||
// TFT (HSPI / TFT_eSPI 已在 platformio.ini 配置)
|
||||
#define TFT_BL_PIN 21
|
||||
|
||||
// TF / microSD (独立 VSPI)
|
||||
#define SD_MISO 19
|
||||
#define SD_MOSI 23
|
||||
#define SD_SCK 18
|
||||
#define SD_CS 5
|
||||
|
||||
// 板载 SC8002B 功放 → P4 喇叭座(DAC2)
|
||||
#define SPEAKER_PIN 26
|
||||
|
||||
// 触摸 XPT2046(SoftSPI 专用脚,VSPI 留给 SD;勿用 TOUCH_CS,会与 TFT_eSPI 冲突)
|
||||
#define CYD_TOUCH_IRQ 36
|
||||
#define CYD_TOUCH_MOSI 32
|
||||
#define CYD_TOUCH_MISO 39
|
||||
#define CYD_TOUCH_CLK 25
|
||||
#define CYD_TOUCH_CS 33
|
||||
|
||||
// 与 Random Nerd Tutorials / temperature 一致:物理竖屏 + LVGL 270 得横屏
|
||||
// 物理竖屏;LVGL ROTATION_270 → 横屏 UI
|
||||
#define SCREEN_WIDTH 240
|
||||
#define SCREEN_HEIGHT 320
|
||||
#define UI_HOR_RES 320
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
struct SdCardInfo {
|
||||
bool mounted;
|
||||
bool present;
|
||||
const char *type; // MMC / SDSC / SDHC / UNKNOWN / NONE
|
||||
const char *filesystem; // FAT12 / FAT16 / FAT32 / exFAT / FAT / —
|
||||
uint64_t card_bytes; // 卡物理容量
|
||||
uint64_t total_bytes; // 分区总容量
|
||||
uint64_t used_bytes;
|
||||
uint64_t free_bytes;
|
||||
uint32_t root_files; // 根目录条目数
|
||||
String error; // 失败原因
|
||||
};
|
||||
|
||||
bool sd_init();
|
||||
void sd_deinit();
|
||||
SdCardInfo sd_read_info();
|
||||
String format_bytes(uint64_t bytes);
|
||||
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "sd_info.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void ui_create();
|
||||
void ui_update(const SdCardInfo &info);
|
||||
void ui_refresh_audio_buttons();
|
||||
void ui_set_touch_debug(int16_t lx, int16_t ly, bool down);
|
||||
|
||||
Reference in New Issue
Block a user