Repository navigation
feat: v2.4.0 — Basic Endpoint Types II: I2C, UART, ADC, PWM_OUT, PWM_IN - #41
Merged
Merged
Conversation
…IN (§Phase 13 milestone 48) Adds rcp/i2c.hpp, rcp/uart.hpp, rcp/adc.hpp, and rcp/pwm.hpp on top of the endpoint-registration/request-dispatch scaffolding established in v2.3.0 (rcp/endpoint.hpp, rcp/gpio.hpp, rcp/spi.hpp): - I2C (ep_type 0x04): controller-only raw byte-stream transfer with address bytes included, an arbitrary-bit-sequence compound-wait match distinct from SPI's fixed truncation rule, and the i2c_mode high-speed enum ambiguity flagged as an explicit open item rather than guessed at. - UART (ep_type 0x05): independent TX/RX queues, RX FIFO fill/drain, read_size-or-uart_timeout read completion, payload-less pure reads, and sub-octet bit-width padding; RX FIFO and read_size are bounded to a documented single-AVTPDU accepted limitation tying back to the fragmentation no-go decision (milestone 52). - ADC (ep_type 0x09): the three-level averaging model, request-driven sampling only, two self-triggering cadence patterns (SelfTimed and ExternalTrigger, the latter keyed to PWM_IN's mid-pulse signal), and a no-signal error path analogous to PWM_IN_NO_SIGNAL. - PWM_OUT (ep_type 0x07) / PWM_IN (ep_type 0x08): a shared period/ active-duration payload; PWM_OUT reuses endpoint.hpp's write-semantics and saturating add/subtract directly; PWM_IN is a response-only read model with PWM_IN_NO_SIGNAL and a mid-pulse trigger signal. endpoint.hpp gains real EndpointTypeId constants for all five types. New coverage: tests/test_i2c.cpp, test_uart.cpp, test_adc.cpp, test_pwm.cpp (REQ-I2C-*/REQ-UART-*/REQ-ADC-*/REQ-PWM-*, traced in .fusa-reqs.json). Bumps kVersion/project version to 2.4.0. Updates ROADMAP.md with a Done (v2.4.0) summary for milestone 48. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
3 of 4 tasks
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 48 ("Basic Endpoint Types II — I2C, UART, ADC, PWM_OUT, PWM_IN", v2.4.0), building on milestone 47's (v2.3.0) endpoint-registration/request-dispatch scaffolding (
rcp/endpoint.hpp,rcp/gpio.hpp,rcp/spi.hpp).rcp/i2c.hpp,ep_type 0x04): controller-only raw byte-stream transfer with address bytes included,compound_wait_matches_bits(an arbitrary-bit-sequence match, distinct from SPI's fixed 4-of-20-byte truncation), andi2c_mode_ofdeliberately decoding only the coarsehshigh-speed bit — the fineri2c_modespeed-grade mapping is flagged as an explicit open item in comments rather than guessed at, per the roadmap's own instruction.rcp/uart.hpp,ep_type 0x05): independent TX/RX queues, RX FIFO fill/drain,read_size-or-uart_timeoutread completion, payload-less "pure" reads, and sub-octet bit-width padding. The RX FIFO andread_sizeare bounded to a documented single-AVTPDU accepted limitation, tied explicitly to milestone 52's already-final fragmentation no-go decision.rcp/adc.hpp,ep_type 0x09): the three-level averaging model (adc_sample_interval→adc_avg_intervals_per_request→adc_combine_avg_values), request-driven sampling only, two self-triggering cadence patterns (SelfTimedandExternalTrigger, the latter keyed to PWM_IN's mid-pulse signal), and a no-signal error path analogous toPWM_IN_NO_SIGNAL.rcp/pwm.hpp,ep_type 0x07/0x08): a sharedperiod/active_durationpayload;PwmOutEndpointreusesrcp::endpoint::apply_bitmask_writedirectly (so GPIO's saturating add/subtract rule applies without re-derivation);PwmInEndpointis a response-only read model withPWM_IN_NO_SIGNALand a mid-pulse trigger signal.rcp/endpoint.hppgains realEndpointTypeIdconstants for all five types, replacing the comment placeholder left by v2.3.0. Version bumped to 2.4.0.ROADMAP.mdmilestone 48 gets aDone (v2.4.0):summary in the same style as milestone 47's.No spec text is reproduced anywhere — comments describe behavior only, citing "OPEN Alliance TC18 Remote Control Protocol Specification v0.5.1_RC" by name per this project's existing convention.
Test plan
cmake --build build --parallel— full clean build with Apple clang (/usr/bin/clang++), 0 errorsctest --test-dir build— 52/52 tests pass (100%), including the 4 new suites (test_i2c,test_uart,test_adc,test_pwm)cpfusa check/lint/cyber/trace --req-coverage 100— all exit 0, 0 errors (new REQ-I2C-/REQ-UART-/REQ-ADC-/REQ-PWM- entries added to.fusa-reqs.json, all traced impl+test)cpfusa verify— 52/52 tests,.fusa-evidence.jsonwritten successfullyrelay conform --strict build/cpp-rcp— PASS (§12.1/§12.2/§12.3), CLI untouched by this change