Skip to content

docs(i2s): move wave8-encoding docs from engine to peripheral (#3526) - #3549

Merged
zackees merged 1 commit into
masterfrom
refactor/wave8-in-peripheral-3526
Jul 1, 2026
Merged

zackees merged 1 commit into
masterfrom
refactor/wave8-in-peripheral-3526

Conversation

@zackees

@zackees zackees commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • packScratchBuffer() docs now reflect that it is a linear byte concatenation and NOT a placeholder for wave8 encoding.
  • Wave8 pulse-major encoding is documented as the peripheral impl's responsibility — the encoded byte stream is a hardware-specific DMA layout (16 lanes × 8 pulses per byte at the wave8 pixel clock), so it belongs next to the DMA register writes, not in the engine.
  • Mock peripheral captures raw channel bytes → host tests stay byte-value-sensitive without depending on wave8 encoding details.
  • Drops two leftover includes (fl/channels/wave8.h, platforms/esp/32/drivers/i2s/wave8_encoder_i2s1.h) from an aborted attempt to inline wave8 in the engine's pack step.

Corrects the ##Staging language in the class docstring — replaces "Stage 2 replaces the body of packScratchBuffer()" with the layering rationale.

Part of the #3526 meta issue for the classic-ESP32 I2S bring-up.

Test plan

  • bash test channel_engine_i2s_esp32dev — passes
  • bash lint --cpp — clean

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified how I2S audio data is handled during transmission.
    • Updated comments to reflect the final processing flow, making it clearer that raw bytes are copied first and encoding happens later in the transmission layer.
    • Removed outdated staging language from inline documentation for improved readability.

Clarifies the layering for the classic-ESP32 I2S modern engine:
`packScratchBuffer()` stays as a linear byte concatenation; the wave8
pulse-major encoding (a hardware-specific DMA layout) is the
peripheral impl's responsibility. This lets the mock peripheral
capture raw channel bytes for byte-value-sensitive tests without
depending on wave8 encoding details.

Also drops two leftover includes from an aborted attempt to inline
wave8 encoding in the engine.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees merged commit 0422e72 into master Jul 1, 2026
10 of 11 checks passed
@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c11c3e47-3470-41af-9516-788b35b748dc

📥 Commits

Reviewing files that changed from the base of the PR and between b3ecd6d and e7c3bea.

📒 Files selected for processing (2)
  • src/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.cpp.hpp
  • src/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.h

📝 Walkthrough

Walkthrough

This PR updates comments and docstrings in the ESP32 I2S channel engine files, replacing descriptions of a planned two-stage ("Staging") implementation with documentation of the final architecture ("Layering"), where the engine copies raw bytes to a scratch buffer and the peripheral performs wave8 encoding during transmit. No logic changes.

Changes

Documentation Update

Layer / File(s) Summary
Engine/peripheral layering documentation
src/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.h, src/platforms/esp/32/drivers/i2s/channel_engine_i2s_esp32dev.cpp.hpp
Class header, method docstring, and implementation comments are updated to describe the engine copying raw bytes into a scratch buffer and calling peripheral->transmit(), with wave8 pulse-major encoding handled inside the peripheral, replacing prior "Stage 1/Stage 2" staging descriptions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#3473: Also updates documentation/comments for ChannelEngineI2sEsp32Dev::packScratchBuffer() and the corresponding header to reflect the layering behavior.
  • FastLED/FastLED#3478: Also updates the same documentation to reflect wave8 encoding occurring inside the peripheral transmit() implementation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/wave8-in-peripheral-3526

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant