Repository navigation
feat(uart): UART2 second lane on classic ESP32 (#3576 Phase 2) - #3579
Conversation
Classic ESP32 has three UARTs; UART0 is the console and UART1 carried
the only LED lane. This adds a second concurrent lane on UART2
("UART2", Bus::UART instance 1).
- ChannelEngineUART takes uart_num (1 = "UART", 2 = "UART2"); the
peripheral config carries it instead of the hardcoded UART1.
- BusTraits<Bus::UART, 1> with its own peripheral+engine holder;
enableAllDrivers() enrolls it on classic ESP32 only for now.
- default_bus_priority(UART, which): secondary lane one below primary.
- i2sPortClaim conflict warning switched to FL_WARN_F_ONCE per review
direction (surprising-but-by-design contention should warn once per
call site, not once per frame).
- fl/channels/README.md engine table updated.
Bench (WROOM COM11, GPIO33→34): UART2 passed: true 4/4 patterns
byte-exact on the UART2 block; regression UART/I2S/I2S0 4/4 each.
Host: 345/345, lint clean.
Co-Authored-By: Claude Fable 5 <[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 (7)
📝 WalkthroughWalkthroughAdds ESP32 UART2 as a second concurrent UART lane: ChannelEngineUART now accepts a uart_num parameter, a new BusTraitsBus::UART,1 specialization is registered with an updated priority function, enableAllChannelDrivers conditionally enables it on ESP32-dev, docs are updated, and an I2S warning macro is switched to warn-once. ChangesESP32 UART2 Second Lane Support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant enableAllChannelDrivers
participant BusTraits_UART1
participant UartBusHolder
participant ChannelEngineUART
enableAllChannelDrivers->>BusTraits_UART1: enableDriver<Bus::UART,1>() [ESP32-dev]
BusTraits_UART1->>UartBusHolder: instancePtr(uart_num=2)
UartBusHolder->>ChannelEngineUART: ChannelEngineUART(peripheral, uart_num=2)
ChannelEngineUART-->>BusTraits_UART1: driver instance
BusTraits_UART1->>BusTraits_UART1: registerWithManager(default_bus_priority(UART,1))
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 |
Phase 2 of the #3576 program: a second concurrent UART LED lane on the UART2 block (
Bus::UARTinstance 1, driver name "UART2"). UART0 stays reserved for the console.ChannelEngineUARTis parameterized byuart_num(1 = "UART", 2 = "UART2"); the peripheral config carries it instead of the hardcoded UART1.BusTraits<Bus::UART, 1>with its own peripheral+engine holder; enrolled byenableAllDrivers()on classic ESP32 only for now (S3/C6 get theirs in the Phase 9 board audit).default_bus_priority(UART, which): secondary lane one below primary (-2 vs -1).i2sPortClaimcontention warning →FL_WARN_F_ONCEper review direction.fl/channels/README.mdengine table updated.Verification
passed: true, 4/4 patterns byte-exact on the UART2 block; regression UART (lane 1), I2S, I2S0 all 4/4.Refs #3576.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes