Repository navigation
feat: v2.3.0 — GPIO & SPI endpoints (§Phase 13 milestone 47) - #40
Merged
Merged
Conversation
Adds rcp/endpoint.hpp: shared endpoint-registration and request-dispatch scaffolding for every combinable-payload endpoint type — ep_type id constants, the 8-way evt[2:0] write-semantics decode (Replace/Or/And/Xor/Reserved/Add/Subtract/Reconfigure), saturating add/subtract helpers generic over the caller's unsigned integer width, apply_bitmask_write covering the six value-combining semantics, and TriggerRegistry, a generic enable/notify/drain trigger-signal table. Adds rcp/gpio.hpp: GPIO (ep_type 0x02) — a 4-byte big-endian pin bitmask payload, apply_gpio_write completing the 8-way semantics (Reconfigure retargets a separate pin-direction mask instead of the pin-value bitmask), per-pin change/rising/falling trigger signals over TriggerRegistry, a functional-config codec interpreting regmap::EndpointFunctionalConfig's previously-opaque blob, and GpioEndpoint tying it into one request-dispatch entry point. Adds rcp/spi.hpp: SPI (ep_type 0x03) — channel_of decoding evt[2:0] as a 0-5 channel selector (SPI's own repurposing of that field, distinct from GPIO's write-semantics use of it), SpiEndpoint::transfer recording a raw full-duplex PICO-out/POCI-in byte exchange per channel and firing CsAssert/TransferComplete/CsDeassert trigger signals in observation order, and compound_wait_matches implementing the compound-wait status-byte truncation rule (first 4 of up to 20 status bytes) as forward-looking scaffolding for the v2.5.0 compound-wait request kind. New coverage in tests/test_endpoint.cpp (REQ-ENDPOINT-001..006), tests/test_gpio.cpp (REQ-GPIO-001..008), and tests/test_spi.cpp (REQ-SPI-001..005), traced in .fusa-reqs.json. Bumps version.hpp and the CMake project version to 2.3.0, and adds ROADMAP.md milestone 47's "Done (v2.3.0)" note following the milestone 44-46 precedent. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements ROADMAP.md milestone 47, "Basic Endpoint Types I — GPIO & SPI (v2.3.0)" — the first two concrete endpoint types on top of the v2.0.0-v2.2.0 wire/lifecycle/regmap/discovery core, and the milestone that establishes the reusable endpoint-registration/request-dispatch pattern every later endpoint type (v2.4.0, v2.7.0) is expected to reuse.
include/rcp/endpoint.hpp(new): shared scaffolding —ep_typeid constants, the 8-wayevt[2:0]write-semantics decode (Replace/Or/And/Xor/Reserved/Add/Subtract/Reconfigure), the saturating add/subtract helpers GPIO and PWM_OUT (v2.4.0) share,apply_bitmask_writefor the six value-combining semantics, and a genericTriggerRegistrytrigger-signal table.include/rcp/gpio.hpp(new): GPIO (ep_type 0x02) — 4-byte big-endian pin bitmask payload,apply_gpio_writecompleting the 8-way semantics (Reconfigure retargets a pin-direction mask), per-pin change/rising/falling trigger signals, a functional-config codec againstregmap::EndpointFunctionalConfig's opaque blob, andGpioEndpoint.include/rcp/spi.hpp(new): SPI (ep_type 0x03) —channel_ofdecodingevt[2:0]as a 0-5 channel selector,SpiEndpoint::transferfor raw full-duplex PICO-out/POCI-in byte exchange with CsAssert/TransferComplete/CsDeassert trigger signals, andcompound_wait_matchesimplementing the compound-wait status-byte truncation rule (scaffolding for v2.5.0).tests/test_endpoint.cpp(REQ-ENDPOINT-001..006),tests/test_gpio.cpp(REQ-GPIO-001..008),tests/test_spi.cpp(REQ-SPI-001..005) — 19 new.fusa-reqs.jsonentries, all traced.version.hpp,CMakeLists.txt), and ROADMAP.md milestone 47 now carries a "Done (v2.3.0)" note following the milestone 44-46 precedent.Per the legal constraint on the confidential OPEN Alliance TC18 spec PDF, all behavior above is this implementation's own original encoding — no spec text is reproduced in code, comments, or this description.
Test plan
cmake --build(Debug, C++17, clang) — full project builds cleanctest— all 48 test binaries pass, including the 3 new ones (rcp_endpoint,rcp_gpio,rcp_spi)cpp-rcpCLI target still builds (RELAY_BUILD_CLI=ON) — unaffected, since it doesn't touch the new headers