Skip to content

v2.3.0 — Basic Endpoint Types I: GPIO & SPI

Choose a tag to compare

@SoundMatt SoundMatt released this 28 Jul 17:05
59d6f58

v2.3.0 — Basic Endpoint Types I: GPIO & SPI (Phase 13 milestone 47)

Third endpoint-facing milestone of the full OPEN Alliance TC18 Remote Control Protocol replacement (see ROADMAP.md), building on v2.0.0's wire codec, v2.1.0's lifecycle/register-map model, and v2.2.0's discovery mechanism. Establishes the endpoint-registration/request-dispatch pattern every later endpoint type reuses.

What changed

  • New rcp/endpoint.hpp: shared scaffolding — ep_type id constants (kEndpointTypeGpio, kEndpointTypeSpi, with the remaining v2.4.0/v2.7.0 ids named in comments), write_semantics_of decoding AcfMessageInfo::evt_op into the 8-way WriteSemantics enum, saturating_add/saturating_subtract templates, apply_bitmask_write covering the six value-combining semantics (Replace/Or/And/Xor/Add/Subtract, Reserved rejected, Reconfigure left to each endpoint type), and a generic TriggerRegistry enable/notify/drain trigger-signal table.
  • New rcp/gpio.hpp: GPIO (ep_type 0x02) — 4-byte big-endian pin bitmask payload codec, apply_gpio_write completing the 8-way semantics (Reconfigure retargets a separate pin-direction mask), per-pin change/rising/falling triggers (evaluate_gpio_triggers), a functional-config codec against regmap::EndpointFunctionalConfig's opaque blob, and GpioEndpoint tying it together into one request-dispatch entry point.
  • New rcp/spi.hpp: SPI (ep_type 0x03) — channel_of decoding evt[2:0] as a 0-5 channel selector, SpiEndpoint::transfer for raw full-duplex PICO-out/POCI-in byte exchange with CsAssert/TransferComplete/CsDeassert trigger signals, and compound_wait_matches implementing the compound-wait status-byte truncation rule (first 4 of up to 20 bytes) as scaffolding for the v2.5.0 compound-wait request kind.
  • New REQ-ENDPOINT-001..006, REQ-GPIO-001..008, REQ-SPI-001..005 requirements (.fusa-reqs.json), tested in tests/test_endpoint.cpp, tests/test_gpio.cpp, tests/test_spi.cpp.

Scope note

Per ROADMAP.md, this milestone covers only GPIO and SPI — the two simplest request/response shapes. I²C, UART, ADC, PWM_OUT, and PWM_IN follow at v2.4.0.

Verification

All 35 ctest suites pass (45 new Catch2 test cases across the 3 new suites); all 20 CI checks green on PR #40 (full build matrix across Linux/macOS/Windows × clang/gcc/msvc, clang-tidy, coverage, relay conform, and the full cpp-FuSa safety/security/traceability lifecycle including 100% requirement coverage).

Full diff: v2.2.0...v2.3.0