Skip to content

feat(platform/lpc): LPC11xx legacy clockless driver — 0x50000000 masked-access GPIO (closes #2878) - #3045

Merged
zackees merged 1 commit into
masterfrom
feat/2878-lpc11-legacy
Jun 14, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/2878-lpc11-legacy

Conversation

@zackees

@zackees zackees commented Jun 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #2878. Stage 4.1 (legacy item) of FastLED #2845.

The modern LPC11Uxx parts already shipped in #2872 against the 0xA0000000 GPIO controller, but the legacy LPC1110/1112/1114/1115 line uses the older 0x50000000 controller with 12-bit masked-access semantics per UM10398 §9. That controller is not register-compatible with the modern one, so the existing fastpin emitted a #error for FL_IS_ARM_LPC_11_LEGACY. This PR lands the dedicated fastpin and re-enables the build.

Changes

  • src/platforms/arm/lpc/fastpin_arm_lpc11_legacy.h — new. MASKED_ACCESS[mask] writes give us single-store hi() / lo() with no read-modify-write — the same property the modern controller's SET/CLR registers provide. Covers all four legacy ports (PIO0..3) via a 48-pin grid; per-package availability is enforced by hardware.
  • src/platforms/arm/lpc/fastpin_arm_lpc.h — #error block replaced with an #include of the new legacy header.
  • src/platforms/arm/lpc/fastled_arm_lpc.h — aggregator banner: legacy family is now "supported via dedicated fastpin + shared M0 C++ clockless" rather than "NOT supported".
  • src/platforms/arm/lpc/README.md — Supported Platforms table flips the LPC11xx legacy row from "#error if targeted" to "Compiles; hardware bring-up pending".

The existing M0 C++ clockless driver (clockless_arm_lpc.h) only consumes the _ARMPIN interface, so no clockless changes are required to light up the new family.

Test plan

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for legacy LPC11xx microcontrollers (LPC1110/1112/1114/1115). These ARM Cortex-M0 processors can now be used with FastLED for LED animation control, featuring dedicated GPIO drivers and clockless timing support. Hardware integration testing is ongoing.

…ked-access GPIO (closes #2878)

Stage 4.1 (legacy item) of FastLED #2845. The modern LPC11Uxx parts
shipped in #2872 share the 0xA0000000 GPIO controller with LPC8xx, but
the legacy LPC1110/1112/1114/1115 line uses the older 0x50000000
controller with 12-bit masked-access semantics per UM10398 sec. 9. That
controller is not register-compatible with the modern one, so the
existing fastpin emitted a `#error` for FL_IS_ARM_LPC_11_LEGACY.

This commit lands:

  * `fastpin_arm_lpc11_legacy.h` -- new fastpin header.
    `MASKED_ACCESS[mask]` writes lift hi()/lo() to single stores with
    no read-modify-write -- same property the modern controller's
    SET/CLR registers provide. Covers all four legacy ports (PIO0..3)
    via a 48-pin grid; per-package availability is enforced by hardware.
  * `fastpin_arm_lpc.h` -- the `#error` block is replaced with an
    include of the legacy header. The modern templates remain scoped
    to LPC8xx / LPC11Uxx / LPC15xx as before.
  * `fastled_arm_lpc.h` -- aggregator banner updated; the legacy
    family is now "supported via dedicated fastpin + shared M0 C++
    clockless" rather than "NOT supported".
  * `README.md` -- the supported-platforms table flips LPC11xx legacy
    from "#error if targeted" to "Compiles; hardware bring-up pending"
    so the doc tracks reality.

Hardware bring-up on real LPC1114 silicon stays as a follow-up
(explicitly out of scope per the issue body). The existing M0 C++
clockless driver in `clockless_arm_lpc.h` already provides the
WS2812 timing path and only consumes the `_ARMPIN` interface, so no
clockless changes are required.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees merged commit 17e1828 into master Jun 14, 2026
5 of 6 checks passed
@coderabbitai

coderabbitai Bot commented Jun 14, 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: c11c8e32-82b4-48ce-bafb-e83fb85f2026

📥 Commits

Reviewing files that changed from the base of the PR and between ea28494 and 0a7f656.

📒 Files selected for processing (4)
  • src/platforms/arm/lpc/README.md
  • src/platforms/arm/lpc/fastled_arm_lpc.h
  • src/platforms/arm/lpc/fastpin_arm_lpc.h
  • src/platforms/arm/lpc/fastpin_arm_lpc11_legacy.h

📝 Walkthrough

Walkthrough

Adds a new fastpin_arm_lpc11_legacy.h implementing the legacy 0x50000000 masked-access GPIO FastPin driver for LPC1110/1112/1114/1115 (Cortex-M0). Updates fastpin_arm_lpc.h to include the new header for FL_IS_ARM_LPC_11_LEGACY targets instead of emitting a #error, updates the wiring comment in fastled_arm_lpc.h, and updates the README platforms table.

Changes

LPC11xx Legacy FastPin Driver

Layer / File(s) Summary
Legacy LPC11xx GPIO register layout, pin mapping, and driver template
src/platforms/arm/lpc/fastpin_arm_lpc11_legacy.h
Defines FL_LPC11_LEGACY_GPIO_Type register struct, GPIO base/stride macros, LPC_GPIO0..3 port pointer macros, compile-time LpcLegacyPinAddr<PIN> (PORT=PIN/12, BIT=PIN%12), and _ARMPIN_LPC11LEGACY template with hi/lo/toggle/strobe/isset/sport/cport operations via masked-access writes. Instantiates FastPin<0..47> specializations and defines MAX_PIN 47 and HAS_HARDWARE_PIN_SUPPORT.
Preprocessor routing update and documentation
src/platforms/arm/lpc/fastpin_arm_lpc.h, src/platforms/arm/lpc/fastled_arm_lpc.h, src/platforms/arm/lpc/README.md
Replaces the compile-time #error for FL_IS_ARM_LPC_11_LEGACY with a conditional #include "fastpin_arm_lpc11_legacy.h". Updates the wiring comment in fastled_arm_lpc.h to document the 0x50000000 GPIO controller and masked-access semantics. Updates the README table row for LPC11xx legacy to reflect the new driver and compile status.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2872: Wired LPC11Uxx modern variants and set up the #error placeholder for legacy LPC11xx that this PR now replaces with a real implementation.
  • FastLED/FastLED#2866: Directly modifies the same fastpin_arm_lpc.h and fastled_arm_lpc.h LPC11 preprocessor gating that this PR extends with legacy routing.
  • FastLED/FastLED#3017: Introduces the FL_IS_ARM_LPC_11_LEGACY macro that gates the new legacy include added by this PR.

Poem

🐇 Hop hop, the #error is gone at last,
The LPC1114's gloomy days are past!
Masked-access writes at 0x50000000,
Forty-eight FastPins now stand in a row.
Hardware bring-up still waits for a friend —
But compiling succeeds, and that's not the end! 🌟

✨ 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 feat/2878-lpc11-legacy

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 and usage tips.

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.

feat(platform/lpc): legacy LPC1110/1112/1114/1115 clockless driver (fastpin for 0x50000000 masked-access GPIO) — Stage 4.1 (legacy) from #2845

1 participant