From 50ee1b44021c7cc291f70fcad1c73f3385e15dc6 Mon Sep 17 00:00:00 2001 From: Wanderingss <1624155937@qq.com> Date: Wed, 18 Nov 2026 19:41:24 +0800 Subject: [PATCH] docs(ioboard): tighten shadow-register note and fix polarity item ref Two comment-only follow-ups carried over from gate #33 (both deferred by the reviewer to keep the accepted face frozen; no code, no size impact - attestation restamped after a no-diff rebuild): - Drivers/BSP/IOBOARD/README.md item 6: the "what I last asked for" gloss of the software shadow register is exact for the 9 relay/LED bits but not for bit6, which ioboard_do_get() reports as the driver-synthesised supply state. Qualify it in place and point at item 4 for the rule instead of restating it. - test/host/ioboard/ioboard_test.c: the ACTIVE-level comment says the polarity fact lives in README section 6 item 7; it has always been item 5 (item 7 is the PE2/PE4 naming residue). This test is the polarity pin, so a wrong cross-ref here is the worst place to leave one. --- Drivers/BSP/IOBOARD/README.md | 5 +++-- scripts/size_attestation.json | 8 ++++---- test/host/ioboard/ioboard_test.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Drivers/BSP/IOBOARD/README.md b/Drivers/BSP/IOBOARD/README.md index 792e1ba9..1e783d5e 100644 --- a/Drivers/BSP/IOBOARD/README.md +++ b/Drivers/BSP/IOBOARD/README.md @@ -254,8 +254,9 @@ ioboard_bits.c ← 纯逻辑:位序组装。只依赖 ,主机侧 合成的那个值,「24V 端子实际带电吗」仍只能上台架用万用表量 —— 成因与手段见第 6 条,此处不重复展开。 5. **极性未经原理图核对**:`IOBOARD_DO_LEVEL_ACTIVE = 1U` 目前只有「用户口径 + 上电初值为 RESET」两条间接依据, 必须按 §5 第 2 步实测确认。 -6. **硬件无辅助触点回读**:`ioboard_do_get()` 读的是**软件影子寄存器**(「我上次让它是什么」), - 不是「继电器现在真的动没动」。后者只能靠辅助触点或万用表。 +6. **硬件无辅助触点回读**:`ioboard_do_get()` 读的是**软件影子寄存器**(「我上次让它是什么」; + bit6 例外,是驱动按合成规则给出的供电状态,见第 4 条),不是「继电器现在真的动没动」。 + 后者只能靠辅助触点或万用表。 7. **PE2 / PE4 是命名残留**:硬件无信号,本驱动不配置、不读取。若 CubeMX 里还留着它们, 那是 `IN_D4` / `IN_E4` 的旧配置,不影响本驱动。 8. **开入位序仅部分验证**:8 路开入与板级丝印 `DI_A`~`DI_H` 的对应关系按移位顺序推定, diff --git a/scripts/size_attestation.json b/scripts/size_attestation.json index 99dba1a6..1f00f1e0 100644 --- a/scripts/size_attestation.json +++ b/scripts/size_attestation.json @@ -1,15 +1,15 @@ { - "built_at": "2026-11-18T19:34:47+08:00", - "fingerprint": "2b815f23ef5e7e502695180c28661baea47730f1132c5eca711ab11b8564d9b2", + "built_at": "2026-11-18T19:40:16+08:00", + "fingerprint": "ab2a2842d208dd3fc465d3a5fa346f423d826bffd5e5456f24aba4724c1aa7c6", "fingerprint_files": 1583, "fingerprint_source": "git-index", "gated_regions": [ "RW_IRAM1", "RW_CCM" ], - "git_head": "74efa671bb11a547f2ab8ac174f586132703a506", + "git_head": "6e0755f97152f62de724e9bde66ba9a83691de08", "map": "MDK-ARM/STM32F407-Demo/STM32F407-Demo.map", - "map_mtime": 1795001672, + "map_mtime": 1795001958, "pct": { "ER_IROM1": 39.68, "RW_CCM": 87.89, diff --git a/test/host/ioboard/ioboard_test.c b/test/host/ioboard/ioboard_test.c index 503853e9..feb5537a 100644 --- a/test/host/ioboard/ioboard_test.c +++ b/test/host/ioboard/ioboard_test.c @@ -370,7 +370,7 @@ static void di_polarity_macros_are_complementary(void) /* * 钉死当前实测极性:低电平有效。 * 这是**硬件事实**(用户口径 2026-11-16 + C 通道实测:ACTIVE 取 1U 时屏上全灭、 - * 取 0U 时对应那一路亮),改它必须同时改 Drivers/BSP/IOBOARD/README.md 第 6 节第 7 条 + * 取 0U 时对应那一路亮),改它必须同时改 Drivers/BSP/IOBOARD/README.md 第 6 节第 5 条 * 与本用例的注释,不能悄悄翻过来。本断言变红就是提醒走这条流程,不是要把它删掉。 */ static void di_active_level_matches_documented_low(void)