Repository navigation
Default LPC845 AUTO to UART DMA - #3614
Conversation
Default LPC845 clockless AUTO to the USART DMA engine, normalize the FASTLED_LPC_UART_DMA macro to a 1/0 value, and keep the DMA ISR enabled by default for descriptor chaining. Allow the UART loopback RX pin to move through the LPC845 switch matrix while keeping DMA request channels tied to the USART instance, per UM11029 Tables 181, 182, and 296. Wire AutoResearch UART loopback through its own opt-in harness define so the library default does not bloat normal LowMemory builds.
|
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 (17)
📝 WalkthroughWalkthroughChanges make FASTLED_LPC_UART_DMA default to enabled on LPC845, convert numerous preprocessor guards from defined()-checks to truthy-value checks, widen UART RX pin validation with a runtime movable-pin check, add SWM-based loopback RX routing, update AutoResearch example/CI build flags, add a pin-label helper, and update documentation. ChangesLPC845 UART DMA Default Enablement
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant App as Application init()
participant Runtime as LpcUartDmaRuntime
participant RouteFns as routeUart1Pins/routeUart2Pins
participant SWM as SWM PINASSIGN registers
participant USART as USART CFG register
App->>Runtime: init()
Runtime->>RouteFns: route TX pin
RouteFns->>SWM: program TXD assignment
Runtime->>Runtime: hasLoopbackRxPin()
alt loopback RX pin configured
Runtime->>RouteFns: route RX pin
RouteFns->>SWM: program RXD assignment
Runtime->>USART: disable LOOP mode
else no loopback RX pin
Runtime->>USART: enable LOOP mode
end
Possibly related issues
✨ 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 |
Default LPC845 clockless AUTO to the USART DMA engine, normalize the FASTLED_LPC_UART_DMA macro to a 1/0 value, and keep the DMA ISR enabled by default for descriptor chaining. Allow the UART loopback RX pin to move through the LPC845 switch matrix while keeping DMA request channels tied to the USART instance, per UM11029 Tables 181, 182, and 296. Wire AutoResearch UART loopback through its own opt-in harness define so the library default does not bloat normal LowMemory builds.
Summary
FASTLED_LPC_UART_DMAnormalized to1/0FASTLED_AUTORESEARCH_LPC_UART_DMAso the library default does not bloat normal LowMemory buildsReferences
Local verification
bash lint --cppbash test --cpp(350/350 passed earlier on this branch)bash lint(passed earlier on this branch)bash compile lpc845 --examples BlinkChannelEngineLpcUartDmaandLpcUartDmaRuntime::{init,armNextChunk,onDmaChunkDone}in the plain Blink buildbash autoresearch lpc845 --uart --upload-port COM10 --no-auto-discover-pins --tx-pin 13 --rx-pin 11 --timeout 120s --skip-lint1,entry1,uart_rx_dma,00xFF0000,0x00FF00,0x55AA33)Summary by CodeRabbit
New Features
Bug Fixes