fix: harden runtime recovery and firmware validation

Fix BSP audio recovery, LVGL initialization and ADC rollback; make demo worker and wireless teardown retry-safe and report recording failures accurately.

Validate all flashed images, add failure-injection host tests, fix fork sync checkout and align bilingual engineering and archive documentation.
This commit is contained in:
cjiio committed 2026-09-17 17:17:20 +08:00
1 parent 25add0044c
commit 3b644a97a0
103 files changed
+2234 -246

No files matched your search

+3 -2
View File
@@ -19,6 +19,7 @@ jobs:
- name: Checkout target repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
ref: main
persist-credentials: false
# Step 2: run the sync action
@@ -34,6 +35,6 @@ jobs:
- name: Sync check
if: failure()
run: |
echo "[Error] 由于上游仓库的 workflow 文件变更,GitHub 可能暂停本次自动更新。请手动 Sync Fork,详见 docs/development/CI-sync-main.md。"
echo "[Error] An upstream workflow change may have paused automatic synchronization. Sync the fork manually; see docs/development/CI-sync-main.md."
echo "[Error] 同步失败,请检查日志;若涉及上游 workflow 变更,请手动 Sync Fork,详见 docs/development/ci/CI-sync-main.md。"
echo "[Error] Synchronization failed; inspect the logs. For upstream workflow changes, Sync the fork manually; see docs/development/ci/CI-sync-main.md."
exit 1
+1
View File
@@ -9,4 +9,5 @@ idf_component_register(
"src/bsp_battery.c"
INCLUDE_DIRS "include"
REQUIRES driver esp_driver_i2c esp_driver_i2s esp_lcd esp_lvgl_port button esp_adc esp_codec_dev
PRIV_REQUIRES esp_timer
)
+6 -1
View File
@@ -15,13 +15,18 @@ esp_err_t bsp_audio_init(void);
// ⚠ 这里有个必须绕开的坑:esp_codec_dev_open() 在 codec【已打开】时会直接返回 OK 且
// 【不重新配置采样率】。若不先 close,16kHz 播完再播 8kHz 会以 16k 时钟送出 ——
// 音调和速度都快一倍。故本函数在格式变化时先 close 再 open。
// 控制口和数据口错误也会检查(不依赖 codec-dev 是否传播错误);失败后停止
// I2S、强制休眠并释放 codec 对象,下次调用重建,不会复用半打开状态。
// 调用方须串行化格式/休眠/唤醒操作,且切换前停止所有 PCM 读写。
esp_err_t bsp_audio_set_format(uint32_t hz, uint8_t bits, uint8_t ch);
// 进入低功耗前强制执行 ES8311 完整 suspend 寄存器序列,回读关键寄存器
// (REG0E 只比较 bit6:0,其余寄存器比较全部位),
// 失败时重试一次,并显式停止 I2S TX/RX。该路径不依赖 codec-dev 是否打开过,
// 因此开机后从未播放也能正确暂停。调用前必须停止所有 PCM 读写;函数幂等,
// 音频未初始化时视为无需处理并返回成功。
// 音频未初始化时视为无需处理并返回成功。失败后的重复调用保留失败结果。
// 休眠时释放 codec 对象但保留共享 I2C 总线和 I2S channel;不依赖 codec
// 内部 enabled 标志恢复,唤醒会重新创建 codec 并恢复音量/格式。
esp_err_t bsp_audio_sleep(void);
// deep sleep 专用:确保 I2S TX/RX 已停止,再将 MCLK/BCLK/WS/DOUT/DIN
Loaded 3 of 103 files, more files were not shown because too many files have changed in this diff. Show more