Files
bfe-core1106-sdk/docs/workflows/relay-drive.md
T
BFE Engineering c756622c96 docs: reposition as the 86 Panel development environment
The repo's documentation framed it as a support repo for one product
(WardenOS). Since going public the real audience is anyone with a Luckfox
Pico 86 Panel: a maintained 6.18 kernel, an off-device development loop,
and a device simulator that exist nowhere else for this board. Reframe the
README and top-level docs board-first, with WardenOS documented as the
downstream consumer it is (ADR-0008).

Also an editorial pass over the whole doc set:
- every H1/H2 is now a short title, not a sentence (ADRs, qemu/, patches/,
  drivers/, architecture, NPU feasibility, config-lint, payload); workflow
  flowchart titles fixed at the source in tools/flowgen.py and regenerated
  with fresh bench numbers
- README Quick Start commands verified against the scripts; requirements
  corrected (curl, bare python, gcc >= 14) and the MC/DC gate added as a
  step (run green locally on gcc 14.2)
- dropped the 'needs python (not python3)' vendor dig: build-kernel.sh
  inherited the same requirement (filed #10 to remove it)
- glossed MC/DC and HPMCU on first use; marked the tests/uboot-ab
  reference as flare-edge; deduplicated the three-simulator list into the
  root README table
2026-08-30 22:19:12 -06:00

21 lines
577 B
Markdown

# Relay Drive
> **Outcome tested:** A relay is exported transparently and driven without disturbing a held contact.
**Coverage**: relays.c — 40/40 conditions, 100% MC/DC (CI-enforced)
```mermaid
flowchart TD
A[warden_relay_set idx,on] --> B{idx < COUNT?}
B -- no --> Z[no-op]
B -- yes --> C{exported?}
C -- no --> D[write export] --> E{exported now?}
E -- no --> Z2[give up]
E -- yes --> F
C -- yes --> F[read direction]
F --> G{dir == out?}
G -- no --> H[preserve level: read value,\nwrite high/low]
G -- yes --> I
H --> I[write value = on?1:0]
```