Skip to content

rewrite(phase3): port pwm and wakeup from c-RCP, fix PWM_OUT Subtract operand order - #140

Merged
SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase3/pwm-wakeup
Aug 21, 2026
Merged

SoundMatt merged 1 commit into
rewrite/v3-from-c-rcpfrom
phase3/pwm-wakeup

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Part of the v3.0.0 ground-up rewrite (#129, ROADMAP.md Phase 17), branch rewrite/v3-from-c-rcp. Third of Phase 3 Wave 2's three batches (alongside phase3/mdio and phase3/spi-uart, separate PRs).

pwm.hpp

wakeup.hpp

  • Prior cpp-RCP wakeup.hpp content was a wholesale invention with no real relationship to c-RCP's actual ep_wakeup.h/.c — re-derived from scratch against c-RCP's current implementation.
  • REQ-WAKEUP-020/026's regmap.c-scoped behavior intentionally not ported here (out of scope for the endpoint module itself; deferred to Phase 4's regmap port, noted in-file).

Call sites

None touched — mock.hpp and powerstate.hpp (and their tests) confirmed compatible with the new APIs without modification.

Verification

Full tree rebuilds clean (223/223 targets), 56/56 ctest suites pass (100%) — independently re-verified from a fresh build in the worktree, not just the porting agent's own report.

… operand order

Part of the v3.0.0 ground-up rewrite (cpp-RCP #129, ROADMAP.md Phase 17),
branch rewrite/v3-from-c-rcp. Third of Phase 3 Wave 2's three batches,
alongside mdio and spi/uart (separate PRs).

## pwm.hpp

- Fixed the same operand-order bug class found and fixed in gpio.hpp
  during PR #137: PWM_OUT's Subtract conditional-request handling used
  current - operand instead of c-RCP's normative request - current.
  This is deliberately fixed per-endpoint (not centralized into
  endpoint.hpp), matching the same caution documented in #137 that this
  bug needed independent re-verification at every endpoint using
  Subtract semantics, not an assumption that one fix covers all of
  them -- confirmed here to be a real, independent instance of the same
  class, not a duplicate report.
- Ported against c-RCP's current RC5-conformant ep_pwm.h/.c.

## wakeup.hpp

- Prior cpp-RCP wakeup.hpp content was a wholesale invention with no
  real relationship to c-RCP's actual ep_wakeup.h/.c -- re-derived from
  scratch against c-RCP's current implementation.
- REQ-WAKEUP-020/026's regmap.c-scoped behavior intentionally NOT
  ported here (out of scope for the endpoint module itself; deferred to
  Phase 4's regmap port, noted in-file).

## Call sites

None touched -- mock.hpp and powerstate.hpp (and their tests) confirmed
compatible with the new pwm.hpp/wakeup.hpp APIs without modification.

## Verification

Full tree rebuilds clean (223/223 targets), 56/56 ctest suites pass
(100%) -- independently re-verified from a fresh build in the worktree,
not just the porting agent's own report.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit 04c0fc5 into rewrite/v3-from-c-rcp Aug 21, 2026
22 checks passed
@SoundMatt
SoundMatt deleted the phase3/pwm-wakeup branch August 21, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant