Strip TF and audio; keep touch-only screen test UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 18:34:19 +08:00
parent 87058272eb
commit f2b14eb30f
14 changed files with 104 additions and 714 deletions

View File

@@ -1,68 +1,15 @@
# CYD TF 卡信息 + 触屏扬声器(LVGL)
# CYD 触控测试(仅屏幕)
在 **ESP32-2432S028(CYD)** 上:
ESP32-2432S028R:LVGL 横屏 + SoftSPI 触摸。无 TF、无喇叭。
- 挂载 TF/microSD,LVGL 显示卡信息
- **触屏按钮**开关扬声器、播放内置音乐
## 硬件
| 功能 | GPIO |
|------|------|
| TFT MOSI / MISO / SCLK | 13 / 12 / 14 |
| TFT CS / DC / BL | 15 / 2 / 21 |
| **SD MOSI / MISO / SCK / CS** | **23 / 19 / 18 / 5** |
| **Speaker(SC8002B → P4)** | **26** |
| **Touch MOSI / MISO / CLK / CS / IRQ** | **32 / 39 / 25 / 33 / 36** |
触摸使用 SoftSPI bitbang,不占用 VSPI,可与 SD 同时工作。喇叭接 **SPEAK / P4**。
## 触屏操作
| 按钮 | 作用 |
|------|------|
| **Speaker ON / OFF** | 打开/关闭扬声器(关=静音并停止播放) |
| **Play Music / Stop** | 播放内置旋律《小星星》;播放中变为 Stop |
建议顺序:先点 **Speaker ON**(会有短提示音)→ 再点 **Play Music**。
## 屏幕信息
- Status / Type / Format / Capacity(TF)
- Audio:当前音频状态
- 用量进度条
## 预编译固件(随时刷,不必编译)
与 `temperature` 工程相同:归档在 [`firmware/cyd/`](firmware/cyd/)(含 bootloader / partitions / app):
```powershell
cd firmware\cyd
.\flash.ps1
# 或 .\flash.ps1 -Port COM3
```
说明见 [`firmware/README.md`](firmware/README.md)。源码更新后重新打包:
```powershell
.\firmware\export_from_build.ps1
# 已编译过、只复制:
.\firmware\export_from_build.ps1 -SkipBuild
```
## 从源码编译烧录
## 构建 / 烧录
```bash
pio run -e cyd -t upload
pio device monitor
pio run -e cyd -t upload --upload-port COM3
```
## 注意事项
或用 `firmware/cyd/flash.bat`。
- TF 需 **FAT/FAT32**。
- 触屏校准与 `temperature` 工程一致(`setRotation(2)` + map);仍偏可改 `src/touch.cpp` 的 `map(...)` 边界。
- 变更请更新 `CHANGELOG.md`、必要时重新 `export_from_build.ps1`,并提交本地 git。
## 界面
## 版本
见 [CHANGELOG.md](CHANGELOG.md)。
四角 + 中心按钮;红点跟随触点。点中按钮变绿并串口打印 `HIT …`。