Files
tftest/README.md
DESKTOP-PUHFO60\dsx2016 2a90649059 Add firmware/cyd archive for flash-without-compile.
Mirror the temperature project layout with export and one-click flash scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-17 17:45:32 +08:00

70 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CYD TF 卡信息 + 触屏扬声器(LVGL)
在 **ESP32-2432S028(CYD)** 上:
- 挂载 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
```
## 注意事项
- TF 需 **FAT/FAT32**。
- 若触屏坐标偏移,改 `src/touch.cpp` 里 `map(...)` 校准范围。
- 若点按无反应,检查排线/旋转;可尝试交换 raw_x/raw_y 映射。
- 变更请更新 `CHANGELOG.md`、必要时重新 `export_from_build.ps1`,并提交本地 git。
## 版本
见 [CHANGELOG.md](CHANGELOG.md)。