Repository navigation
feat(i2s): factory + Phase 2d slot-0 swap prep + agent-doc guardrail (#3526) - #3542
Conversation
…3526) ## Changes ### `channel_engine_i2s_esp32dev.{h,cpp.hpp}` — new factory Adds `fl::createI2sEsp32DevEngine()` that builds a `ChannelEngineI2sEsp32Dev` wrapping a real `I2sPeripheralEsp32DevEsp` peripheral, returned as `shared_ptr<IChannelDriver>` for channel-manager registration. On non-classic-ESP32 builds returns nullptr. Ready for Phase 2c-SPI / Phase 2d proper to wire into `BusTraits<Bus::FLEX_IO, 0>` when the SPI transmit path lands. ### `channel_drivers_esp32.impl.hpp` — comment explaining swap semantics Documents in-code that the modern engine and the `I2S_SPI` driver wrap the same I2S1 peripheral — both target `Bus::FLEX_IO, 0` and the transition is a swap (Phase 2c-SPI first, then Phase 2d swaps slot 0), not a coexistence. No binding change ships in this PR. ### `agents/docs/cpp-standards.md` — new REQUIRED rule "One peripheral, one `Bus::FLEX_IO` slot (REQUIRED)" captures the lesson from this session's Phase 2d prep attempt. Agent had proposed registering the modern engine at slot 1 alongside `I2S_SPI` at slot 0 as a "bench-parallel" step — developer caught it: same peripheral means same slot; slots are for genuinely separate silicon blocks (e.g. ESP32-P4 PARLIO at slot 0, LCD_CAM at slot 1). ## Verification - `bash test --cpp`: 345/345 pass. - `bash lint --cpp`: clean. - No runtime binding change — factory is library-linked but unused until Phase 2c-SPI unblocks the slot-0 swap. Part of #3516 meta / #3526. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new factory function ChangesESP32Dev I2S Engine Factory and Docs
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
New createI2sEsp32DevEngine() factory (unused until Phase 2c-SPI unblocks slot-0 swap). New REQUIRED agent-doc rule: 'One peripheral, one Bus::FLEX_IO slot' — captures the lesson that same peripheral means same slot, not parallel-bench-testing on separate slots. Test plan: 345/345 pass, lint clean.
Summary by CodeRabbit
New Features
Documentation