Repository navigation
feat(lpc): LPC845 Arduino serial I/O + pin dispatch (supersedes #2996) - #2997
Conversation
Rebase of the core src changes from #2996 (phatpaul) onto current master, which already carries the bare-metal LPC port. Drops the example sketches. - io_lpc: add Arduino Serial-backed implementation under `#if ARDUINO`, preserving master's bare-metal stub path for non-Arduino builds - pin.h: route LPC parts to platforms/shared/pin_noop.hpp - FastLED.cpp.hpp: skip the __cxa_pure_virtual definition under ARDUINO (provided by the Arduino core) Co-authored-by: Paul Abbott <[email protected]>
These two platform headers were missing the `// IWYU pragma: private` marker, failing the cpp lint check on master.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds Arduino Serial API support for LPC platforms when the ChangesLPC Arduino Serial Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platforms/arm/lpc/io_lpc.cpp.hpp`:
- Line 60: Replace bare Arduino millis() calls with the prefixed fl::millis() in
this file: change the assignment unsigned long start = millis(); (and the other
occurrences of millis() flagged by the review) to use fl::millis() so the code
uses the project's fl:: prefixed timing API consistently.
- Line 67: Replace the bare call to yield() with fl::yield() so the code uses
the project's prefixed helper; locate the call to yield() in io_lpc.cpp.hpp and
change it to fl::yield(), leaving surrounding logic intact.
In `@src/platforms/pin.h`:
- Around line 44-46: Remove the redundant LPC-specific `#elif` branch that
includes "platforms/shared/pin_noop.hpp" for macros FL_LPC845, FL_LPC804,
FL_LPC11_USB, FL_LPC15, and FL_LPC11_LEGACY because FL_IS_ARM_LPC already covers
those variants; specifically delete the conditional block that tests "`#elif`
defined(FL_LPC845) || defined(FL_LPC804) || defined(FL_LPC11_USB) ||
defined(FL_LPC15) || defined(FL_LPC11_LEGACY)" and its include of
"platforms/shared/pin_noop.hpp" so the existing FL_IS_ARM_LPC branch and its
selection of pin_noop.hpp remain the single source of truth.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ac80aaa6-c03d-48bc-b66d-841bb513d71d
📒 Files selected for processing (5)
src/FastLED.cpp.hppsrc/platforms/arm/lpc/io_lpc.cpp.hppsrc/platforms/esp/32/channel_poll_signal_esp32.hsrc/platforms/pin.hsrc/platforms/shared/channel_poll_signal.h
…n dispatch - io_lpc: use fl::millis()/fl::yield() instead of bare Arduino calls, per project guidelines; add the chrono.h / yield.h includes - pin.h: remove the redundant LPC variant #elif branch — FL_IS_ARM_LPC (which rolls up FL_LPC845/804/11/15) already routes to pin_noop.hpp
|
Follow-up: the LPC linker-script path-resolution issue noted during the rebase (why the example shipped a copied |
Supersedes #2996.
Rebases the core
src/changes from @phatpaul's WIP PR #2996 onto currentmaster, which has since absorbed most of the LPC port (bare-metal support in #2989/#2992/#2995). Original commit authorship preserved.What changed vs #2996
Most of #2996's
src/edits were already merged intomasterin a more complete form (clockless driver,led_sysdefs, unity build). What remains genuinely additive:io_lpc.cpp.hpp— adds the ArduinoSerial-backed I/O implementation under#if defined(ARDUINO), while preserving master's bare-metal stub path for non-Arduino builds (so lpc: move bare-metal support into platform code #2989's bare-metal support is not regressed).pin.h— routes LPC parts (LPC845/804/11U/15/11-legacy) toplatforms/shared/pin_noop.hpp.FastLED.cpp.hpp— skips the__cxa_pure_virtualdefinition underARDUINO(the Arduino core already provides it).Dropped from #2996
examples/BlinkLPC845Arduino/andexamples/BlinkLPC845CMSIS/sketches (kept out of the example/CI matrix per project policy).#include "fastspi_types.h"inspi_arm_lpc.hand a commented-out unused-variable block in the sharedm0clockless_c.h— both noise that's unnecessary against current master.Also included
fix(lint): added the missing// IWYU pragma: privateto two pre-existing channel_poll_signal headers that were failingbash lint --cppon master.Notes
Per #2996, Serial on real hardware was still WIP at the time. This PR keeps the implementation compile-gated to Arduino LPC builds and does not touch the native test path.
🤖 Generated with Claude Code
Co-authored-by: Paul Abbott [email protected]
Summary by CodeRabbit
Improvements
Refactor