2b466b85f0
New read-only content page under 实时数据 → 开入开出 showing the board's
8 opto inputs (DI_A..DI_H, 合/分) and 4 relay outputs (KO6/TRIP/ERT/CLZ,
吸合/释放) as a 12-row list, 8 rows per page, 2 pages.
Data path reuses the existing de-bounced input poll instead of adding a
second hardware reader:
defaultTask (50 ms) → ioboard_di_snap_publish() → de-bounced snapshot
→ ioboard_di_snap_lookup() [new registration channel]
→ ui_data_feed_tick() (uiTask, 200 ms)
→ ui_data_rt_t.dio_di_* / dio_do_*
No new critical sections, no new hardware access on the UI path. Outputs
come from the volatile shadow register (a memory read, no lock).
Semantic honesty, recorded in ui_page_di_do.c and README §6:
· Output state is the software shadow register (ODR mirror), NOT a
mechanical contact feedback — this platform has no auxiliary contact
readback path. ioboard_do_read_level() also reads ODR, so comparing
the two is tautological.
· IOBOARD_DO_LEVEL_ACTIVE polarity has not been checked against the
schematic.
· Input bit order has not been verified by manual shorting. The
2026-11-16 run read 0x00 eight times because the operator had no time
to short each channel — the data path itself was fine.
· Board-level inputs are deliberately kept out of the 33-point telemetry
bitmap (IEC 104 point-table semantics); the two have no mapping.
Invalid snapshots render "--", never 合/分 or 吸合/释放: painting "no data"
as "all inputs released" would tell the field the inputs are open when we
simply failed to read them.
Board-verified 2026-11-16: page 1 shows 分 on all 8 inputs, page 2 shows
释放 on all 4 outputs, page footer and paging correct. Input bit order
still pending manual shorting.
Also: regenerate ui_font_cn_12 for 吸/释, add golden references for both
pages, align check_menu_rows.py L2 geometry with the now-4-item submenu,
and register the new source file in both the Keil project and CMake.
Reviewed independently; zero blocking findings.
App/app/ — 应用入口与全局定义
应用层的入口与全局定义:初始化编排、功能编译开关、跨模块的就绪事件定义。
文件一览
| 文件 | 作用 |
|---|---|
app_main.c/h |
应用初始化入口 app_main_init:时间子系统优先 → RS485 → NAND → ADC → 诊断(在 osKernelStart 之前执行) |
app_cfg.h |
功能裁剪的决策占位说明——2026-10-22 起不含任何宏(原 3 个 APP_*_ENABLE 零消费点,已删;接回方法见该文件修改记录 v1.2) |
sys_events.h |
系统就绪事件定义(CMSIS-RTOS v2 Event Flags:SYS_EVT_NET_READY / SYS_EVT_STORAGE_READY / SYS_EVT_FTP_READY / SYS_EVT_TIMESYNC_READY 及命令位) |
初始化顺序(app_main_init)
sd2506_init // 时间子系统优先,使后续日志带时间戳
sys_clock_init // 墙钟(RTC 故障降级并返回 -1 → 触发自检)
rs485_init
gd5f2gq5ue_init
tpafe5160_init
SD2506 诊断 // ID / 时间 / 温度 / 电池
tpafe5160_start_conv_irq // 首次 ADC 转换
⚠️ 以上全部在内核启动前执行 → 禁止任何 FreeRTOS/CMSIS-RTOS API 调用 (
osMessageQueueNew等会杀死启动)。内核前日志走无锁静态缓冲(见../log/)。
相关文档
- 架构全景:
docs/架构设计/项目架构总览.md - 启动顺序与就绪屏障:
docs/架构设计/项目启动顺序管理.md - 墙钟:
docs/子系统设计/系统墙钟时间维护说明.md