Repository navigation
feat(platform/lpc): scope LPC8xx driver code to LPC8xx-only (#2865) - #2866
Conversation
Tighten the family gates so `_ARMPIN` and the bit-banged `ClocklessController` in `src/platforms/arm/lpc/` activate only for LPC845 / LPC804 instead of any `FL_IS_ARM_LPC` build. With LPC11xx (Cortex-M0) and LPC15xx (Cortex-M3) detection now landing via #2849 and #2859, the family-level gate would silently compile LPC8xx-targeted GPIO controller layouts and M0+ ASM selection for chips that ship a different GPIO controller (legacy GPIO at 0x50000000 with masked-access semantics on LPC11xx per UM10398 / UM10462; GPIO per UM11074 on LPC15xx) and a different architecture (M0 not M0+ on LPC11xx; M3 on LPC15xx). Surface the gap with a clear `#error` in `fastled_arm_lpc.h` that points LPC11xx / LPC15xx builds at #2845 Stage 4 as the tracking issue for the follow-up driver wiring, and refresh the `is_arm.h` comment block so the LPC family roll-up reflects what's actually detected today. No behaviour change for in-tree LPC8xx builds (no platform configuration currently defines `FL_LPC11` / `FL_LPC15`); this is a latent-bug fix that keeps the next LPC family scaffolds from accidentally activating LPC8xx code paths. Closes #2865. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
PR changed again? Review this PR in Change Stack to compare snapshots and stay oriented. 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 (4)
📝 WalkthroughWalkthroughThis PR narrows the LPC ARM driver scope to prevent wrong-family compilation. FastPin and Clockless drivers are restricted to LPC8xx (LPC845/LPC804), and compile-time errors are added for LPC11xx/LPC15xx builds. LPC detection documentation is clarified. ChangesLPC8xx Driver Scoping
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
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 |
Closes #2865. Follow-up to #2849 (LPC11xx detection) and #2859 (LPC15xx detection); prep work tracked under #2845 Stage 4.
Summary
_ARMPINtemplate gate insrc/platforms/arm/lpc/fastpin_arm_lpc.hfromFL_IS_ARM_LPCtoFL_LPC845 || FL_LPC804.ClocklessControllergate insrc/platforms/arm/lpc/clockless_arm_lpc.hto the same LPC8xx-specific predicate (the existingFL_LPC804 && FASTLED_LPC_PLUopt-out is preserved).#errorinsrc/platforms/arm/lpc/fastled_arm_lpc.hforFL_LPC11/FL_LPC15builds, pointing at meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845 Stage 4 as the tracking issue for driver wiring.src/platforms/arm/is_arm.hto reflect that LPC8xx, LPC11xx, and LPC15xx are all detected today (with driver scope still LPC8xx-only).Why
The current
FL_IS_ARM_LPCgate is family-level. With #2849 and #2859 having shipped LPC11xx and LPC15xx detection, anFL_LPC11orFL_LPC15build would silently compile against the LPC8xx GPIO controller layout (SET[0]/CLR[0]at0xA0000000) even though LPC11xx ships the legacy GPIO at0x50000000with masked-access semantics (UM10398 §9, UM10462 §9) and LPC15xx ships a different controller again (UM11074). The architecture macros are likewise wrong: LPC11xx is Cortex-M0 (not M0+) and LPC15xx is Cortex-M3.No platform configuration in-tree currently defines
FL_LPC11/FL_LPC15, so this PR has no behaviour change for shipping LPC8xx builds. It is a latent-bug fix that keeps the next LPC family scaffolds from accidentally activating LPC8xx code paths.Out of scope (deliberately)
led_sysdefs_arm_lpc.hupdates (FL_IS_ARM_M0 for LPC11xx, F_CPU defaults, CMSIS device headers).led_sysdefs_*files are blocked byprotect_platform_headers.py; the override env var must be set at Claude Code launch.fastpin_arm_lpc11.h/clockless_arm_lpc11.h. Per the meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845 second comment: "patterns are non-trivial to verify without hardware - prefer the maintainer add these once a board is in hand."Test plan
bash lint— cleanbash test --cpp— 310/310 passed (no regressions in LPC8xx unit-test surface area)FL_LPC11/FL_LPC15today (verified by issue feat(platform/lpc): scope LPC8xx driver code to LPC8xx-only (prep for #2845 Stage 4) #2865 description; the gate only fires for explicit user opt-in)🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation